Location: PHPKode > projects > TEMS -Time and Expense Management System > tems/invoices/config.php
<?php

/*********************************************************************************
 * TES is a Time and Expense Management program developed by
 * Initechs, LLC. Copyright (C) 2009 - 2010 Initechs LLC.
 *
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU General Public License version 3 as published by the
 * Free Software Foundation with the addition of the following permission added
 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
 * IN WHICH THE COPYRIGHT IS OWNED BY INITECHS, INITECHS DISCLAIMS THE WARRANTY
 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
 * details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, see http://www.gnu.org/licenses or write to the Free
 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301 USA.
 *
 * You can contact Initechs headquarters at 1841 Piedmont Road, Suite 301,
 * Marietta, GA, USA. or at email address hide@address.com
 *
 * The interactive user interfaces in modified source and object code versions
 * of this program must display Appropriate Legal Notices, as required under
 * Section 5 of the GNU General Public License version 3.
 *
 * In accordance with Section 7(b) of the GNU General Public License version 3,
 * these Appropriate Legal Notices must retain the display od the "Initechs" logo.
 * If the display of the logo is not reasonably feasible for technical reasons,
 * the Appropriate Legal Notices must display the words "Powered by Initechs".

 ********************************************************************************/

$invoiceHeaderMetaData = array(
'uid' => array('label' => 'Unique ID', 'displaysize' => 20, 'fieldlen' => 20, 'fieldType' => 'textField',),
'invoices_id'=> array('label' => 'Invoice', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'textField',),
'accounts_id'=> array('label' => 'Account', 'displaysize' => 20, 'fieldlen' => 50, 'fieldType' => 'textField',),
'begindate' => array('label' => 'From', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'dateField',),
'enddate' => array('label' => 'To', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'dateField',),
'invoicedate' => array('label' => 'Invoiced On', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'dateField',),
'status' => array('label' => 'Status','displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'radioField', 'validValues' => 'Invoice_status_array'),
'billhrs' => array('label' => 'Billable Hours', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'textField', 'sort' => 'no', 'functionName' => 'getbillhrs'),
'nonbillhrs' => array('label' => 'Non-billable Hours', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'textField', 'sort' => 'no', 'functionName' => 'getnonbillhrs'),
'totalhrs' => array('label' => 'Total Hours', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'textField', 'sort' => 'no', 'functionName' => 'gettotalhrs'),
'billamount' => array('label' => 'Total Amount', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'textField', 'sort' => 'no', 'functionName' => 'getbillamount'),
'expenseamount' => array('label' => 'Expense', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'textField', 'sort' => 'no', 'functionName' => 'getexpenseamount'),
'billingcycle' => array('label' => 'Billing Cycle', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'textField', 'sort' => 'no', 'functionName' => 'getbillingcycle'),
'invoiceamount' => array('label' => 'Invoice Amount', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'textField', 'sort' => 'no', 'functionName' => 'getinvoiceamount'),
);

$TimeDetailsMetaData = array(
'uid' => array('label' => 'Unique ID', 'displaysize' => 20, 'fieldlen' => 20, 'fieldType' => 'textField',),
'users_id'=> array('label' => 'User', 'displaysize' => 20, 'fieldlen' => 20, 'fieldType' => 'textField',),
'projects_id'=> array('label' => 'Project', 'displaysize' => 20, 'fieldlen' => 20, 'fieldType' => 'textField',),
'tasks_id' => array('label' => 'Task', 'displaysize' => 20, 'fieldlen' => 20, 'fieldType' => 'textField',),
'workdate' => array('label' => 'Work Date', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'dateField',),
'weekenddate' => array('label' => 'Weekend Date', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'dateField',),
'location' => array('label' => 'Work Location','displaysize' => 2, 'fieldlen' => 2, 'fieldType' => 'textField',), 
'description' => array('label' => 'Description', 'displaysize' => 50, 'fieldlen' => 100, 'fieldType' => 'textField',),
'comments' => array('label' => 'Comments', 'displaysize' => 50, 'fieldlen' => 100, 'fieldType' => 'textField',),
'billablehours' => array('label' => 'Billable Hours', 'displaysize' => 4, 'fieldlen' => 4, 'fieldType' => 'textField',),
'nonbillablehours' => array('label' => 'Non-billable Hours', 'displaysize' => 4, 'fieldlen' => 4, 'fieldType' => 'textField',),
'status' => array('label' => 'Status','displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'radioField', 'validValues' => 'times_status_array'),
'submitdate' => array('label' => 'Submit Date', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'dateField',),
'approvedate' => array('label' => 'Approve Date', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'dateField',),
'invoices_id' => array('label' => 'Invoice Number', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'textField',),
'createat' => array('label' => 'Created On', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'dateField',),
'createby' => array('label' => 'Created By', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'textField',),
'changeat' => array('label' => 'Modified On', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'dateField',),
'changeby' => array('label' => 'Modified By', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'textField',),
'action'=> array('label' => 'Next Action', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'textField', 'sort' => 'no', 'functionName' => 'get_next_action_time'),
'totalhrs' => array('label' => 'Total Hours', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'textField', ),
'totalbillhrs' => array('label' => 'Total billhrs', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'textField',),
);

$expenseheadersMetaData = array(
'uid' => array('label' => 'Unique ID', 'displaysize' => 20, 'fieldlen' => 20, 'fieldType' => 'textField',),
'users_id' => array('label' => 'User', 'displaysize' => 20, 'fieldlen' => 20, 'fieldType' => 'textField',),
'projects_id' => array('label' => 'Project', 'displaysize' => 20, 'fieldlen' => 20, 'fieldType' => 'textField',),
'weekenddate' => array('label' => 'Weekend Date', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'dateField',),
'description' => array('label' => 'Description', 'displaysize' => 50, 'fieldlen' => 100, 'fieldType' => 'textField',),
'comment' => array('label' => 'Comments', 'displaysize' => 50, 'fieldlen' => 100, 'fieldType' => 'textField',),
'location' => array('label' => 'Location', 'displaysize' => 2, 'fieldlen' => 2, 'fieldType' => 'textField',),
'submitdate' => array('label' => 'Date Submited', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'dateField',),
'approvedate' => array('label' => 'Date Approved', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'dateField',),
'invoicedate' => array('label' => 'Date Invoiced', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'dateField',),
'status' => array('label' => 'Status', 'displaysize' => 10, 'fieldlen' => 2, 'fieldType' => 'radioField', 'validValues' => 'expenseheaders_status_array'),
'createat' => array('label' => 'Created At', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'dateField',),
'createby' => array('label' => 'Created By', 'displaysize' => 20, 'fieldlen' => 20, 'fieldType' => 'textField',),
'changeat' => array('label' => 'Changed At', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'dateField',),
'changeby' => array('label' => 'Changed By', 'displaysize' => 20, 'fieldlen' => 20, 'fieldType' => 'textField',),
'action'=> array('label' => 'Next Action', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'textField', 'sort' => 'no', 'functionName' => 'get_next_action_exp'),
'totalamount' => array('label' => 'Total Amount', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'textField', 'functionName' => 'get_total_amount'),
);

$invoiceHeaderlistLayout = array(
'fieldMetaData' => 'invoiceHeaderMetaData',
'heading' => 'List Invoices',
'invoices_id' => 'left',
'accounts_id' => 'left',
'begindate' => 'left',
'enddate' => 'left',
'billhrs' => 'right',
'nonbillhrs' => 'right',
'totalhrs' => 'right',
'billamount' => 'right',
'expenseamount' => 'right',
'invoiceamount' => 'right',
'billingcycle' => 'center',
);

$searchLayout = array(
'fieldMetaData' => 'invoiceHeaderMetaData',
'heading' => 'Search Invoice',
'accounts_id' => 'haveselect',
'invoices_id' => 'editable',
'status' => 'editable',
);

$invoiceHeaderbrowseLayout = array(
'fieldMetaData' => 'invoiceHeaderMetaData',
'heading' => 'Browse Invoice',
'invoices_id' => 'viewonly',
'accounts_id' => 'viewonly',
'begindate' => 'viewonly',
'enddate' => 'viewonly',
'billingcycle' => 'viewonly',
'billhrs' => 'viewonly',
'nonbillhrs' => 'viewonly',
'totalhrs' => 'viewonly',
'billamount' => 'viewonly',
'expenseamount' => 'viewonly',
'invoiceamount' => 'viewonly',
'invoicedate' => 'viewonly',
'status' => 'viewonly',
'addl_buttons' => array(
array('heading' => 'Print', 'module' => 'invoices', 'action' => 'Print',),
array('heading' => 'Create Invoice', 'module' => 'invoices', 'action' => 'Create', 'conditionalValues' => 'status = 10',),
array('heading' => 'Times', 'module' => 'invoices', 'action' => 'Time',),
array('heading' => 'Expenses', 'module' => 'invoices', 'action' => 'Expense',),
array('heading' => 'Undo Invoice', 'module' => 'invoices', 'action' => 'Delete', 'conditionalValues' => 'status = 90',),
array('heading' => 'Back', 'module' => 'invoices', 'action' => 'List',),
),
);

$createLayout = array(
'fieldMetaData' => 'invoiceHeaderMetaData',
'heading' => 'Create Invoice',
'uid' => 'hidden',
'accounts_id' => 'viewonly',
);

$deleteLayout = array(
'fieldMetaData' => 'invoiceHeaderMetaData',
'heading' => 'Delete Invoice',
'uid' => 'hidden',
'accounts_id' => 'viewonly',
'invoices_id' => 'viewonly',
);

$TimeDetailListLayout = array(
'fieldMetaData' => 'TimeDetailsMetaData',
'heading' => 'Time Records',
'users_id' => 'viewonly',
'workdate' => 'viewonly',
'projects_id' => 'viewonly',
'tasks_id' => 'viewonly',
'description' => 'viewonly',
'billablehours' => 'viewonly',
'nonbillablehours' => 'viewonly',
'status' => 'viewonly',
'submitdate' => 'viewonly',
'approvedate' => 'viewonly',
'action' => 'viewonly',
);

$ExpenseDetailListLayout = array(
'fieldMetaData' => 'expenseheadersMetaData',
'heading' => 'Expenses',
'users_id' => 'viewonly',
'projects_id' => 'viewonly',
'weekenddate' => 'viewonly',
'location' => 'viewonly',
'submitdate' => 'viewonly',
'approvedate' => 'viewonly',
'invoicedate' => 'viewonly',
'totalamount' => 'viewonly',
'status' => 'viewonly',
'action' => 'viewonly',
);


$expenseheaders_status_array = array(
'10' => 'Entered',
'20' => 'Submitted',
'30' => 'Verified',
'80' => 'On Hold',
'90' => 'Invoiced'
);


$times_status_array = array(
'10' => 'Entered',
'20' => 'Submitted',
'30' => 'Approved',
'40' => 'authorized',
'80' => 'On Hold',
'90' => 'Invoiced'
);


$Invoice_status_array = array(
'10' => 'Open',
'90' => 'Invoiced'
);

$times_Hold_status_array = array(
'25' => 'On Hold',
'20' => 'Submitted',
);


// Table, Reference field
$lookupArray = array(
'invoices_id' => array('module' => 'invoices', 'table' => 'invoiceheaders', 'field' => 'invoices_id'),
'accounts_id' => array('module' => 'accounts', 'table' => 'accounts', 'field' => 'accounts_id'),
);

?>
Return current item: TEMS -Time and Expense Management System