<?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".
********************************************************************************/
$fieldMetaData = 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', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'dateField',),
'location' => array('label' => 'Work Location','displaysize' => 20, 'fieldlen' => 20, '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' => 5, 'fieldlen' => 5, 'fieldType' => 'textField',),
'nonbillablehours' => array('label' => 'Non-Billable Hours', 'displaysize' => 5, 'fieldlen' => 5, 'fieldType' => 'textField',),
'bill_nonbill_hours' => array('label' => 'Total Hours', 'displaysize' => 4, 'fieldlen' => 4, 'fieldType' => 'textField', 'sort' => 'no', 'functionName' => 'add_bill_nonbill_hours'),
'rate' => array('label' => 'Bill Rate', 'displaysize' => 4, 'fieldlen' => 4, 'fieldType' => 'textField',),
'status' => array('label' => 'Status','displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'radioField', 'validValues' => 'times_status_array'),
'submitdate' => array('label' => 'Submitted On', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'dateField',),
'approvedate' => array('label' => 'Approved On', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'dateField',),
'invoices_id' => array('label' => 'Invoice Number', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'textField',),
'usergroup' => array('label' => 'User Group', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'textField',),
'createat' => array('label' => 'Created At', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'dateField',),
'createby' => array('label' => 'Created by', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'textField',),
'changeat' => array('label' => 'Modified At', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'dateField',),
'changeby' => array('label' => 'Modified By', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'textField',),
'tbsubmittedbillablehours' => array('label' => 'Billable Hours To Be Submitted', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'textField', 'functionName' => 'get_tobe_submitted_billablehours'),
'tbsubmittednonbillablehours' => array('label' => 'Non-billable Hours To Be Submitted', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'textField', 'functionName' => 'get_tobe_submitted_nonbillablehours'),
'submittedbillablehours' => array('label' => 'Already Submitted Billable Hours', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'textField', 'functionName' => 'get_submitted_billablehours'),
'submittednonbillablehours' => array('label' => 'Already Submitted Non-billable Hours', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'textField', 'functionName' => 'get_submitted_nonbillablehours'),
'tbapprovedbillablehours' => array('label' => 'Billable Hours to be Approved', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'textField', 'functionName' => 'get_tobe_approved_billablehours'),
'tbapprovednonbillablehours' => array('label' => 'Non-billable Hours to be Approved', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'textField', 'functionName' => 'get_tobe_approved_nonbillablehours'),
'approvedbillablehours' => array('label' => 'Already Approved Billable Hours', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'textField', 'functionName' => 'get_approved_billablehours'),
'approvednonbillablehours' => array('label' => 'Already Approved Non-billable Hours', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'textField', 'functionName' => 'get_approved_nonbillablehours'),
'totalbillablehours' => array('label' => 'Total Billable Hours', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'textField', 'functionName' => 'get_total_billablehours'),
'totalnonbillablehours' => array('label' => 'Total Non-billable Hours', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'textField', 'functionName' => 'get_total_nonbillablehours'),
'totalhours' => array('label' => 'Total Hours', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'textField', 'functionName' => 'get_total_hours'),
'action'=> array('label' => 'Next Action', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'textField', 'sort' => 'no', 'functionName' => 'get_next_action'),
'summaryaction'=> array('label' => 'Next Action', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'textField', 'sort' => 'no', 'functionName' => 'get_next_summary_action'),
'totalbillhrs' => array('label' => 'Billable Hours', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'textField',),
'totalnonbillhrs' => array('label' => 'Non-billable Hours', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'textField',),
'totalhrs' => array('label' => 'Total Hours', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'textField', ),
'loweststatus' => array('label' => 'Status','displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'optionField', 'validValues' => 'times_status_array'),
'filter' => array('label' => 'Show Criteria','displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'radioField', 'validValues' => 'times_filter_array', 'nontable' => 'yes'),
);
$fieldMetaDataForPrint = array(
'users_id'=> array('label' => 'User', 'displaysize' => 20, 'fieldlen' => 20, 'fieldType' => 'textField',),
'projects_id'=> array('label' => 'Project', 'displaysize' => 20, 'fieldlen' => 20, 'fieldType' => 'textField', 'helptext' => 'Leave this field blank to print time report for all projects that you have worked on.'),
'weekenddate' => array('label' => 'Weekend', 'displaysize' => 10, 'fieldlen' => 10, 'fieldType' => 'dateField',),
);
$createLayout = array(
'fieldMetaData' => 'fieldMetaData',
'heading' => 'Create Time Card',
'users_id' => 'haveselect',
'workdate' => 'editable',
'projects_id' => 'haveselect',
'tasks_id' => 'haveselect',
'description' => 'editable',
'comments' => 'editable',
'billablehours' => 'editable',
'nonbillablehours' => 'editable',
'location' => 'editable',
);
$editLayout = array(
'fieldMetaData' => 'fieldMetaData',
'heading' => 'Edit Time Card',
'uid' => 'hidden',
'users_id' => 'haveselect',
'workdate' => 'editable',
'projects_id' => 'haveselect',
'tasks_id' => 'haveselect',
'description' => 'editable',
'comments' => 'editable',
'billablehours' => 'editable',
'nonbillablehours' => 'editable',
'location' => 'editable',
);
$submitLayout = array(
'fieldMetaData' => 'fieldMetaData',
'heading' => 'Submit Time Cards of the Week',
'users_id' => 'editable',
'weekenddate' => 'editable',
);
$printLayout = array(
'fieldMetaData' => 'fieldMetaDataForPrint',
'heading' => 'Print Weekly Time Card',
'users_id' => 'editable',
'projects_id' => 'editable',
'weekenddate' => 'editable',
);
$deleteLayout = array(
'fieldMetaData' => 'fieldMetaData',
'heading' => 'Delete Time Card',
'uid' => 'hidden',
'users_id' => 'viewonly',
'workdate' => 'viewonly',
'projects_id' => 'viewonly',
'tasks_id' => 'viewonly',
'description' => 'viewonly',
'comments' => 'viewonly',
'billablehours' => 'viewonly',
'nonbillablehours' => 'viewonly',
'bill_nonbill_hours' => 'viewonly',
'location' => 'viewonly',
'status' => 'viewonly',
'submitdate' => 'viewonly',
'approvedate' => 'viewonly',
'invoices_id' => 'viewonly',
'createat' => 'viewonly',
'createby' => 'viewonly',
'changeat' => 'viewonly',
'changeby' => 'viewonly',
);
$browseLayout = array(
'fieldMetaData' => 'fieldMetaData',
'heading' => 'Browse Time Card',
'uid' => 'hidden',
'users_id' => 'viewonly',
'workdate' => 'viewonly',
'projects_id' => 'viewonly',
'tasks_id' => 'viewonly',
'description' => 'viewonly',
'comments' => 'viewonly',
'billablehours' => 'viewonly',
'nonbillablehours' => 'viewonly',
'bill_nonbill_hours' => 'viewonly',
'location' => 'viewonly',
'status' => 'viewonly',
'submitdate' => 'viewonly',
'approvedate' => 'viewonly',
'invoices_id' => 'viewonly',
'createat' => 'viewonly',
'createby' => 'viewonly',
'changeat' => 'viewonly',
'changeby' => 'viewonly',
'addl_buttons' => array(
array('heading' => 'Edit', 'module' => 'times', 'action' => 'Edit', 'conditionalValues' => 'status = 10, 20',),
array('heading' => 'Copy', 'module' => 'times', 'action' => 'Create',),
array('heading' => 'Delete', 'module' => 'times', 'action' => 'Delete', 'conditionalValues' => 'status = 10, 20',),
array('heading' => 'Hold', 'module' => 'times', 'action' => 'Hold', 'conditionalValues' => 'status = 10, 20',),
array('heading' => 'Release', 'module' => 'times', 'action' => 'Release', 'conditionalValues' => 'status = 80',),
),
);
$listLayout = array(
'fieldMetaData' => 'fieldMetaData',
'heading' => 'List Time Cards',
'users_id' => 'viewonly',
'workdate' => 'viewonly',
'projects_id' => 'viewonly',
'tasks_id' => 'viewonly',
'billablehours' => 'viewonly',
'nonbillablehours' => 'viewonly',
'bill_nonbill_hours' => 'viewonly',
'status' => 'viewonly',
'action' => 'viewonly',
);
$searchLayout = array(
'fieldMetaData' => 'fieldMetaData',
'heading' => 'Search Time Card',
'users_id' => 'haveselect',
'weekenddate'=>'editable',
'workdate' => 'editable',
'projects_id' => 'haveselect',
'status' => 'editable',
'filter' => 'editable',
);
$submitTimeDetailLayout = array(
'fieldMetaData' => 'fieldMetaData',
'heading' => 'Submit Time Cards of the Week',
'users_id' => 'viewonly',
'projects_id' => 'viewonly',
'tasks_id' => 'viewonly',
'workdate' => 'viewonly',
'billablehours' => 'viewonly',
'nonbillablehours' => 'viewonly',
'status' => 'viewonly',
'submitdate' => 'viewonly',
);
$submitSummaryLayout = array(
'fieldMetaData' => 'fieldMetaData',
'heading' => 'Submit Time Cards of the Week',
'uid' => 'hidden',
'users_id' => 'viewonly',
'weekenddate' => 'viewonly',
'tbsubmittedbillablehours' => 'viewonly',
'tbsubmittednonbillablehours' => 'viewonly',
'submittedbillablehours' => 'viewonly',
'submittednonbillablehours' => 'viewonly',
'totalhours' => 'viewonly',
);
$approveSummaryLayout = array(
'fieldMetaData' => 'fieldMetaData',
'heading' => 'Approve Time Cards of the Week',
'uid' => 'hidden',
'users_id' => 'viewonly',
'weekenddate' => 'viewonly',
'tbapprovedbillablehours' => 'viewonly',
'tbapprovednonbillablehours' => 'viewonly',
'approvedbillablehours' => 'viewonly',
'approvednonbillablehours' => 'viewonly',
'totalhours' => 'viewonly',
);
$holdLayout = array(
'fieldMetaData' => 'fieldMetaData',
'heading' => 'Hold Time Card',
'uid' => 'hidden',
'users_id' => 'viewonly',
'projects_id' => 'viewonly',
'tasks_id' => 'viewonly',
'workdate' => 'viewonly',
'description' => 'viewonly',
'comments' => 'viewonly',
'billablehours' => 'viewonly',
'nonbillablehours' => 'viewonly',
'submitdate' => 'viewonly',
'status' => 'hidden',
'location' => 'viewonly',
'createat' => 'viewonly',
'createby' => 'viewonly',
'changeat' => 'viewonly',
'changeby' => 'viewonly'
);
$byWeekendListLayout = array(
'fieldMetaData' => 'fieldMetaData',
'heading' => 'List Time Cards by Week',
'users_id' => 'viewonly',
'weekenddate' => 'viewonly',
'totalbillhrs' => 'viewonly',
'totalnonbillhrs' => 'viewonly',
'totalhrs' => 'viewonly',
'loweststatus' => 'viewonly',
'summaryaction' => 'viewonly',
);
$byWeekendListSearchLayout = array(
'fieldMetaData' => 'fieldMetaData',
'heading' => 'Search Time Cards by Week',
'users_id' => 'haveselect',
'weekenddate'=>'editable',
'filter' => 'editable',
);
$times_status_array = array(
'10' => 'Entered',
'20' => 'Submitted',
'30' => 'Approved',
'80' => 'Held',
'90' => 'Invoiced'
);
$times_filter_array = array(
'10' => 'My Time',
'20' => 'My Group',
'30' => 'Report To Me'
);
$lookupArray = array(
'users_id' => array('module' => 'users', 'table' => 'users', 'field' => 'users_id'),
'projects_id' => array('module' => 'projects', 'table' => 'projects', 'field' => 'projects_id'),
'tasks_id' => array('module' => 'projecttasks', 'table' => 'projects_tasks', 'field' => 'tasks_id')
);
?>