コード例 #1
0
 function _getFactoryOptions($name)
 {
     $retval = NULL;
     switch ($name) {
         case 'default_schedule_status':
             $sf = TTnew('ScheduleFactory');
             $retval = $sf->getOptions('status');
             break;
         case 'type':
             $retval = array(10 => TTi18n::gettext('Standard'), 20 => TTi18n::gettext('Advanced: Fixed'), 30 => TTi18n::gettext('Advanced: Average'));
             break;
         case 'scheduled_day':
             $retval = array(0 => TTi18n::gettext('Calendar Days'), 1 => TTi18n::gettext('Scheduled Days'), 2 => TTi18n::gettext('Holiday Week Days'));
             break;
         case 'columns':
             $retval = array('-1020-name' => TTi18n::gettext('Name'), '-1010-type' => TTi18n::gettext('Type'), '-1010-default_schedule_status' => TTi18n::gettext('Default Schedule Status'), '-1010-minimum_employed_days' => TTi18n::gettext('Minimum Employed Days'), '-2000-created_by' => TTi18n::gettext('Created By'), '-2010-created_date' => TTi18n::gettext('Created Date'), '-2020-updated_by' => TTi18n::gettext('Updated By'), '-2030-updated_date' => TTi18n::gettext('Updated Date'));
             break;
         case 'list_columns':
             $retval = Misc::arrayIntersectByKey($this->getOptions('default_display_columns'), Misc::trimSortPrefix($this->getOptions('columns')));
             break;
         case 'default_display_columns':
             //Columns that are displayed by default.
             $retval = array('name', 'type', 'updated_date', 'updated_by');
             break;
         case 'unique_columns':
             //Columns that are unique, and disabled for mass editing.
             $retval = array('name');
             break;
         case 'linked_columns':
             //Columns that are linked together, mainly for Mass Edit, if one changes, they all must.
             $retval = array();
             break;
     }
     return $retval;
 }
コード例 #2
0
 function _getFactoryOptions($name)
 {
     $retval = NULL;
     switch ($name) {
         case 'object_type':
             $hotlf = TTnew('HierarchyObjectTypeListFactory');
             $retval = $hotlf->getOptions('object_type');
             break;
         case 'short_object_type':
             $hotlf = TTnew('HierarchyObjectTypeListFactory');
             $retval = $hotlf->getOptions('short_object_type');
             break;
         case 'columns':
             $retval = array('-1010-name' => TTi18n::gettext('Name'), '-1020-description' => TTi18n::gettext('Description'), '-1030-superiors' => TTi18n::gettext('Superiors'), '-1030-subordinates' => TTi18n::gettext('Subordinates'), '-1050-object_type_display' => TTi18n::gettext('Objects'), '-2000-created_by' => TTi18n::gettext('Created By'), '-2010-created_date' => TTi18n::gettext('Created Date'), '-2020-updated_by' => TTi18n::gettext('Updated By'), '-2030-updated_date' => TTi18n::gettext('Updated Date'));
             break;
         case 'list_columns':
             $retval = Misc::arrayIntersectByKey($this->getOptions('default_display_columns'), Misc::trimSortPrefix($this->getOptions('columns')));
             break;
         case 'default_display_columns':
             //Columns that are displayed by default.
             $retval = array('name', 'description', 'superiors', 'subordinates', 'object_type_display');
             break;
         case 'unique_columns':
             //Columns that are unique, and disabled for mass editing.
             $retval = array();
             break;
         case 'linked_columns':
             //Columns that are linked together, mainly for Mass Edit, if one changes, they all must.
             $retval = array();
             break;
     }
     return $retval;
 }
コード例 #3
0
 function _getFactoryOptions($name)
 {
     $retval = NULL;
     switch ($name) {
         case 'columns':
             $retval = array('-1010-first_name' => TTi18n::gettext('First Name'), '-1020-last_name' => TTi18n::gettext('Last Name'), '-1030-recurring_schedule_template_control' => TTi18n::gettext('Template'), '-1040-recurring_schedule_template_control_description' => TTi18n::gettext('Description'), '-1050-start_date' => TTi18n::gettext('Start Date'), '-1060-end_date' => TTi18n::gettext('End Date'), '-1070-auto_fill' => TTi18n::gettext('Auto-Punch'), '-1090-title' => TTi18n::gettext('Title'), '-1099-user_group' => TTi18n::gettext('Group'), '-1100-default_branch' => TTi18n::gettext('Branch'), '-1110-default_department' => TTi18n::gettext('Department'), '-2000-created_by' => TTi18n::gettext('Created By'), '-2010-created_date' => TTi18n::gettext('Created Date'), '-2020-updated_by' => TTi18n::gettext('Updated By'), '-2030-updated_date' => TTi18n::gettext('Updated Date'));
             break;
         case 'list_columns':
             $retval = Misc::arrayIntersectByKey($this->getOptions('default_display_columns'), Misc::trimSortPrefix($this->getOptions('columns')));
             break;
         case 'default_display_columns':
             //Columns that are displayed by default.
             $retval = array('first_name', 'last_name', 'recurring_schedule_template_control', 'recurring_schedule_template_control_description', 'start_date', 'end_date');
             break;
         case 'unique_columns':
             //Columns that are unique, and disabled for mass editing.
             $retval = array();
             break;
         case 'linked_columns':
             //Columns that are linked together, mainly for Mass Edit, if one changes, they all must.
             $retval = array();
             break;
     }
     return $retval;
 }
コード例 #4
0
 function _getFactoryOptions($name)
 {
     $retval = NULL;
     switch ($name) {
         case 'type':
             $retval = array(10 => TTi18n::gettext('Daily'), 20 => TTi18n::gettext('Weekly'), 30 => TTi18n::gettext('Bi-Weekly'), 40 => TTi18n::gettext('Sunday'), 50 => TTi18n::gettext('Monday'), 60 => TTi18n::gettext('Tuesday'), 70 => TTi18n::gettext('Wednesday'), 80 => TTi18n::gettext('Thursday'), 90 => TTi18n::gettext('Friday'), 100 => TTi18n::gettext('Saturday'), 150 => TTi18n::gettext('2 Or More Days/Week Consecutively Worked'), 151 => TTi18n::gettext('3 Or More Days/Week Consecutively Worked'), 152 => TTi18n::gettext('4 Or More Days/Week Consecutively Worked'), 153 => TTi18n::gettext('5 Or More Days/Week Consecutively Worked'), 154 => TTi18n::gettext('6 Or More Days/Week Consecutively Worked'), 155 => TTi18n::gettext('7 Or More Days/Week Consecutively Worked'), 180 => TTi18n::gettext('Holiday'), 200 => TTi18n::gettext('Over Schedule (Daily) / No Schedule'), 210 => TTi18n::gettext('Over Schedule (Weekly) / No Schedule'), 300 => TTi18n::gettext('2 Or More Days Consecutively Worked'), 301 => TTi18n::gettext('3 Or More Days Consecutively Worked'), 302 => TTi18n::gettext('4 Or More Days Consecutively Worked'), 303 => TTi18n::gettext('5 Or More Days Consecutively Worked'), 304 => TTi18n::gettext('6 Or More Days Consecutively Worked'), 305 => TTi18n::gettext('7 Or More Days Consecutively Worked'), 350 => TTi18n::gettext('2nd Consecutive Day Worked'), 351 => TTi18n::gettext('3rd Consecutive Day Worked'), 352 => TTi18n::gettext('4th Consecutive Day Worked'), 353 => TTi18n::gettext('5th Consecutive Day Worked'), 354 => TTi18n::gettext('6th Consecutive Day Worked'), 355 => TTi18n::gettext('7th Consecutive Day Worked'));
             break;
         case 'calculation_order':
             $retval = array(10 => 90, 20 => 200, 30 => 300, 40 => 20, 50 => 30, 60 => 40, 70 => 50, 80 => 60, 90 => 70, 100 => 80, 150 => 92, 151 => 91, 152 => 90, 153 => 89, 154 => 88, 155 => 87, 300 => 98, 301 => 97, 302 => 96, 303 => 95, 304 => 94, 305 => 93, 350 => 86, 351 => 85, 352 => 84, 353 => 83, 354 => 82, 355 => 81, 180 => 10, 200 => 100, 210 => 210);
             break;
         case 'columns':
             $retval = array('-1010-type' => TTi18n::gettext('Type'), '-1020-name' => TTi18n::gettext('Name'), '-1030-trigger_time' => TTi18n::gettext('Active After'), '-1040-rate' => TTi18n::gettext('Rate'), '-1050-accrual_rate' => TTi18n::gettext('Accrual Rate'), '-2000-created_by' => TTi18n::gettext('Created By'), '-2010-created_date' => TTi18n::gettext('Created Date'), '-2020-updated_by' => TTi18n::gettext('Updated By'), '-2030-updated_date' => TTi18n::gettext('Updated Date'));
             break;
         case 'list_columns':
             $retval = Misc::arrayIntersectByKey($this->getOptions('default_display_columns'), Misc::trimSortPrefix($this->getOptions('columns')));
             break;
         case 'default_display_columns':
             //Columns that are displayed by default.
             $retval = array('type', 'name', 'updated_date', 'updated_by');
             break;
         case 'unique_columns':
             //Columns that are unique, and disabled for mass editing.
             $retval = array('name');
             break;
         case 'linked_columns':
             //Columns that are linked together, mainly for Mass Edit, if one changes, they all must.
             $retval = array();
             break;
     }
     return $retval;
 }
コード例 #5
0
 function _getFactoryOptions($name)
 {
     $retval = NULL;
     switch ($name) {
         case 'columns':
             $retval = array('-1010-level' => TTi18n::gettext('Level'), '-1020-user' => TTi18n::gettext('Superior'), '-2000-created_by' => TTi18n::gettext('Created By'), '-2010-created_date' => TTi18n::gettext('Created Date'), '-2020-updated_by' => TTi18n::gettext('Updated By'), '-2030-updated_date' => TTi18n::gettext('Updated Date'));
             break;
         case 'list_columns':
             $retval = Misc::arrayIntersectByKey($this->getOptions('default_display_columns'), Misc::trimSortPrefix($this->getOptions('columns')));
             break;
         case 'default_display_columns':
             //Columns that are displayed by default.
             $retval = array('level', 'user');
             break;
         case 'unique_columns':
             //Columns that are unique, and disabled for mass editing.
             $retval = array();
             break;
         case 'linked_columns':
             //Columns that are linked together, mainly for Mass Edit, if one changes, they all must.
             $retval = array();
             break;
     }
     return $retval;
 }
コード例 #6
0
 function _getFactoryOptions($name)
 {
     $retval = NULL;
     switch ($name) {
         case 'preset':
             $pf = TTnew('PermissionFactory');
             $retval = $pf->getOptions('preset');
             break;
         case 'level':
             $retval = array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 11 => 11, 12 => 12, 13 => 13, 14 => 14, 15 => 15, 16 => 16, 17 => 17, 18 => 18, 19 => 19, 20 => 20, 21 => 21, 22 => 22, 23 => 23, 24 => 24, 25 => 25);
             break;
         case 'columns':
             $retval = array('-1000-name' => TTi18n::gettext('Name'), '-1010-description' => TTi18n::gettext('Description'), '-1020-level' => TTi18n::gettext('Level'), '-1030-total_users' => TTi18n::gettext('Employees'), '-2000-created_by' => TTi18n::gettext('Created By'), '-2010-created_date' => TTi18n::gettext('Created Date'), '-2020-updated_by' => TTi18n::gettext('Updated By'), '-2030-updated_date' => TTi18n::gettext('Updated Date'));
             break;
         case 'list_columns':
             $retval = Misc::arrayIntersectByKey(array('name', 'description', 'level'), Misc::trimSortPrefix($this->getOptions('columns')));
             break;
         case 'default_display_columns':
             //Columns that are displayed by default.
             $retval = array('name', 'description', 'level', 'total_users', 'updated_by', 'updated_date');
             break;
         case 'unique_columns':
             //Columns that are unique, and disabled for mass editing.
             $retval = array('name');
             break;
     }
     return $retval;
 }
コード例 #7
0
 function _getFactoryOptions($name)
 {
     $retval = NULL;
     switch ($name) {
         case 'columns':
             $retval = array('-1010-status' => TTi18n::gettext('Status'), '-1020-type' => TTi18n::gettext('Type'), '-1030-name' => TTi18n::gettext('Tax / Deduction'), '-1040-calculation' => TTi18n::gettext('Calculation'), '-1110-first_name' => TTi18n::gettext('First Name'), '-1120-last_name' => TTi18n::gettext('Last Name'), '-2000-created_by' => TTi18n::gettext('Created By'), '-2010-created_date' => TTi18n::gettext('Created Date'), '-2020-updated_by' => TTi18n::gettext('Updated By'), '-2030-updated_date' => TTi18n::gettext('Updated Date'));
             break;
         case 'list_columns':
             $retval = Misc::arrayIntersectByKey($this->getOptions('default_display_columns'), Misc::trimSortPrefix($this->getOptions('columns')));
             break;
         case 'default_display_columns':
             //Columns that are displayed by default.
             $retval = array('status', 'type', 'name', 'calculation');
             break;
         case 'unique_columns':
             //Columns that are unique, and disabled for mass editing.
             $retval = array();
             break;
         case 'linked_columns':
             //Columns that are linked together, mainly for Mass Edit, if one changes, they all must.
             $retval = array();
             break;
     }
     return $retval;
 }
コード例 #8
0
 function _getFactoryOptions($name, $parent = NULL)
 {
     $retval = NULL;
     switch ($name) {
         case 'columns':
             $retval = array('-1100-type' => TTi18n::gettext('Type'), '-1110-status' => TTi18n::gettext('Status'), '-1210-time_stamp' => TTi18n::gettext('Date/Time'), '-1220-date' => TTi18n::gettext('Date'), '-1230-time' => TTi18n::gettext('Time'), '-1239-in_type' => TTi18n::gettext('In Type'), '-1240-in_time_stamp' => TTi18n::gettext('In Date/Time'), '-1250-in_punch_date' => TTi18n::gettext('In Date'), '-1260-in_punch_time' => TTi18n::gettext('In Time'), '-1269-out_type' => TTi18n::gettext('Out Type'), '-1270-out_time_stamp' => TTi18n::gettext('Out Date/Time'), '-1280-out_punch_date' => TTi18n::gettext('Out Date'), '-1290-out_punch_time' => TTi18n::gettext('Out Time'), '-1310-branch' => TTi18n::gettext('Branch'), '-1320-department' => TTi18n::gettext('Department'), '-1410-station_id' => TTi18n::gettext('Station ID'), '-1420-longitude' => TTi18n::gettext('Longitude'), '-1430-latitude' => TTi18n::gettext('Latitude'), '-1500-note' => TTi18n::gettext('Note'));
             //Since getOptions() can be called without first setting a company, we don't always know the product edition for the currently
             //logged in employee.
             if (is_object($this->getCompanyObject()) and $this->getCompanyObject()->getProductEdition() >= TT_PRODUCT_CORPORATE or !is_object($this->getCompanyObject()) and getTTProductEdition() >= TT_PRODUCT_CORPORATE) {
                 $retval += array('-1330-job' => TTi18n::gettext('Job'), '-1340-job_item' => TTi18n::gettext('Task'), '-1350-quantity' => TTi18n::gettext('Quantity'), '-1360-bad_quantity' => TTi18n::gettext('Bad Quantity'));
             }
             $retval = Misc::addSortPrefix(Misc::prependArray($this->getUserIdentificationColumns(), Misc::trimSortPrefix($retval)));
             ksort($retval);
             break;
         case 'column_aliases':
             //Used for converting column names after they have been parsed.
             $retval = array('type' => 'type_id', 'status' => 'status_id', 'branch' => 'branch_id', 'department' => 'department_id', 'job' => 'job_id', 'job_item' => 'job_item_id');
             break;
         case 'import_options':
             $retval = array('-1010-fuzzy_match' => TTi18n::getText('Enable smart matching.'), '-1020-disable_rounding' => TTi18n::getText('Disable rounding.'));
             break;
         case 'parse_hint':
             $upf = TTnew('UserPreferenceFactory');
             $retval = array('branch' => array('-1010-name' => TTi18n::gettext('Name'), '-1010-manual_id' => TTi18n::gettext('Code')), 'department' => array('-1010-name' => TTi18n::gettext('Name'), '-1010-manual_id' => TTi18n::gettext('Code')), 'job' => array('-1010-name' => TTi18n::gettext('Name'), '-1010-manual_id' => TTi18n::gettext('Code')), 'job_item' => array('-1010-name' => TTi18n::gettext('Name'), '-1010-manual_id' => TTi18n::gettext('Code')), 'time_stamp' => $upf->getOptions('date_time_format'), 'in_time_stamp' => $upf->getOptions('date_time_format'), 'out_time_stamp' => $upf->getOptions('date_time_format'), 'date' => $upf->getOptions('date_format'), 'in_punch_date' => $upf->getOptions('date_format'), 'out_punch_date' => $upf->getOptions('date_format'), 'time' => $upf->getOptions('time_format'), 'in_punch_time' => $upf->getOptions('time_format'), 'out_punch_time' => $upf->getOptions('time_format'));
             break;
     }
     return $retval;
 }
コード例 #9
0
 function _getFactoryOptions($name)
 {
     $retval = NULL;
     switch ($name) {
         case 'columns':
             $retval = array('-1020-name' => TTi18n::gettext('Name'), '-1030-meal_policy' => TTi18n::gettext('Meal Policy'), '-1040-absence_policy' => TTi18n::gettext('Absence Policy'), '-1050-over_time_policy' => TTi18n::gettext('Overtime Policy'), '-1060-start_stop_window' => TTi18n::gettext('Window'), '-2000-created_by' => TTi18n::gettext('Created By'), '-2010-created_date' => TTi18n::gettext('Created Date'), '-2020-updated_by' => TTi18n::gettext('Updated By'), '-2030-updated_date' => TTi18n::gettext('Updated Date'));
             break;
         case 'list_columns':
             $retval = Misc::arrayIntersectByKey($this->getOptions('default_display_columns'), Misc::trimSortPrefix($this->getOptions('columns')));
             break;
         case 'default_display_columns':
             //Columns that are displayed by default.
             $retval = array('name', 'meal_policy', 'start_stop_window', 'updated_date', 'updated_by');
             break;
         case 'unique_columns':
             //Columns that are unique, and disabled for mass editing.
             $retval = array('name');
             break;
         case 'linked_columns':
             //Columns that are linked together, mainly for Mass Edit, if one changes, they all must.
             $retval = array();
             break;
     }
     return $retval;
 }
コード例 #10
0
 function _getFactoryOptions($name)
 {
     $retval = NULL;
     switch ($name) {
         case 'status':
             $retval = array(10 => TTi18n::gettext('ENABLED'), 20 => TTi18n::gettext('DISABLED'));
             break;
         case 'columns':
             $retval = array('-1010-status' => TTi18n::gettext('Status'), '-1020-manual_id' => TTi18n::gettext('Code'), '-1030-name' => TTi18n::gettext('Name'), '-1140-address1' => TTi18n::gettext('Address 1'), '-1150-address2' => TTi18n::gettext('Address 2'), '-1160-city' => TTi18n::gettext('City'), '-1170-province' => TTi18n::gettext('Province/State'), '-1180-country' => TTi18n::gettext('Country'), '-1190-postal_code' => TTi18n::gettext('Postal Code'), '-1200-work_phone' => TTi18n::gettext('Work Phone'), '-1210-fax_phone' => TTi18n::gettext('Fax Phone'), '-1300-tag' => TTi18n::gettext('Tags'), '-2000-created_by' => TTi18n::gettext('Created By'), '-2010-created_date' => TTi18n::gettext('Created Date'), '-2020-updated_by' => TTi18n::gettext('Updated By'), '-2030-updated_date' => TTi18n::gettext('Updated Date'));
             break;
         case 'list_columns':
             $retval = Misc::arrayIntersectByKey($this->getOptions('default_display_columns'), Misc::trimSortPrefix($this->getOptions('columns')));
             break;
         case 'default_display_columns':
             //Columns that are displayed by default.
             $retval = array('manual_id', 'name', 'city', 'province');
             break;
         case 'unique_columns':
             //Columns that are unique, and disabled for mass editing.
             $retval = array('name', 'manual_id');
             break;
         case 'linked_columns':
             //Columns that are linked together, mainly for Mass Edit, if one changes, they all must.
             $retval = array('country', 'province', 'postal_code');
             break;
     }
     return $retval;
 }
コード例 #11
0
 function _getFactoryOptions($name)
 {
     $retval = NULL;
     switch ($name) {
         case 'length_of_service_unit':
             $retval = array(10 => TTi18n::gettext('Day(s)'), 20 => TTi18n::gettext('Week(s)'), 30 => TTi18n::gettext('Month(s)'), 40 => TTi18n::gettext('Year(s)'), 50 => TTi18n::gettext('Hour(s)'));
             break;
         case 'columns':
             $retval = array('-1010-length_of_service' => TTi18n::gettext('Length Of Service'), '-1020-length_of_service_unit' => TTi18n::gettext('Units'), '-1030-accrual_rate' => TTi18n::gettext('Accrual Rate'), '-1050-maximum_time' => TTi18n::gettext('Maximum Time'), '-1050-rollover_time' => TTi18n::gettext('Rollover Time'), '-2000-created_by' => TTi18n::gettext('Created By'), '-2010-created_date' => TTi18n::gettext('Created Date'), '-2020-updated_by' => TTi18n::gettext('Updated By'), '-2030-updated_date' => TTi18n::gettext('Updated Date'));
             break;
         case 'list_columns':
             $retval = Misc::arrayIntersectByKey($this->getOptions('default_display_columns'), Misc::trimSortPrefix($this->getOptions('columns')));
             break;
         case 'default_display_columns':
             //Columns that are displayed by default.
             $retval = array('length_of_service', 'length_of_service_unit', 'accrual_rate', 'maximum_time', 'rollover_time');
             break;
         case 'unique_columns':
             //Columns that are unique, and disabled for mass editing.
             $retval = array();
             break;
         case 'linked_columns':
             //Columns that are linked together, mainly for Mass Edit, if one changes, they all must.
             $retval = array();
             break;
     }
     return $retval;
 }
コード例 #12
0
 function _getFactoryOptions($name)
 {
     $retval = NULL;
     switch ($name) {
         case 'status':
             $retval = array(10 => TTi18n::gettext('OPEN'), 12 => TTi18n::gettext('Locked - Pending Approval'), 20 => TTi18n::gettext('CLOSED'), 30 => TTi18n::gettext('Post Adjustment'));
             break;
         case 'columns':
             $retval = array('-1010-type' => TTi18n::gettext('Type'), '-1020-status' => TTi18n::gettext('Status'), '-1030-pay_period_schedule' => TTi18n::gettext('Pay Period Schedule'), '-1040-start_date' => TTi18n::gettext('Start Date'), '-1050-end_date' => TTi18n::gettext('End Date'), '-1060-transaction_date' => TTi18n::gettext('Transaction Date'), '-1500-total_punches' => TTi18n::gettext('Punches'), '-1505-pending_requests' => TTi18n::gettext('Pending Requests'), '-1510-exceptions_critical' => TTi18n::gettext('Critical'), '-1510-exceptions_high' => TTi18n::gettext('High'), '-1512-exceptions_medium' => TTi18n::gettext('Medium'), '-1514-exceptions_low' => TTi18n::gettext('Low'), '-1520-verified_timesheets' => TTi18n::gettext('Verified'), '-1522-pending_timesheets' => TTi18n::gettext('Pending'), '-1524-total_timesheets' => TTi18n::gettext('Total'), '-1530-ps_amendments' => TTi18n::gettext('PS Amendments'), '-1540-pay_stubs' => TTi18n::gettext('Pay Stubs'), '-2000-created_by' => TTi18n::gettext('Created By'), '-2010-created_date' => TTi18n::gettext('Created Date'), '-2020-updated_by' => TTi18n::gettext('Updated By'), '-2030-updated_date' => TTi18n::gettext('Updated Date'));
             break;
         case 'list_columns':
             $retval = Misc::arrayIntersectByKey($this->getOptions('default_display_columns'), Misc::trimSortPrefix($this->getOptions('columns')));
             break;
         case 'default_display_columns':
             //Columns that are displayed by default.
             $retval = array('pay_period_schedule', 'type', 'status', 'start_date', 'end_date', 'transaction_date');
             break;
         case 'unique_columns':
             //Columns that are unique, and disabled for mass editing.
             $retval = array('start_date', 'end_date', 'transaction_date');
             break;
         case 'linked_columns':
             //Columns that are linked together, mainly for Mass Edit, if one changes, they all must.
             $retval = array();
             break;
     }
     return $retval;
 }
コード例 #13
0
 function _getFactoryOptions($name)
 {
     $retval = NULL;
     switch ($name) {
         case 'type':
             $retval = array(10 => TTi18n::gettext('Accolade'), 15 => TTi18n::gettext('Discipline'), 20 => TTi18n::gettext('Review (General)'), 25 => TTi18n::gettext('Review (Wage)'), 30 => TTi18n::gettext('Review (Performance)'), 35 => TTi18n::gettext('Accident/Injury'), 37 => TTi18n::gettext('Background Check'), 38 => TTi18n::gettext('Drug Test'), 40 => TTi18n::gettext('Entrance Interview'), 45 => TTi18n::gettext('Exit Interview'));
             break;
         case 'term':
             $retval = array(10 => TTi18n::gettext('Positive'), 20 => TTi18n::gettext('Neutral'), 30 => TTi18n::gettext('Negative'));
             break;
         case 'severity':
             $retval = array(10 => TTi18n::gettext('Normal'), 20 => TTi18n::gettext('Low'), 30 => TTi18n::gettext('Medium'), 40 => TTi18n::gettext('High'), 50 => TTi18n::gettext('Critical'));
             break;
         case 'status':
             $retval = array(10 => TTi18n::gettext('Scheduled'), 20 => TTi18n::gettext('Being Reviewed'), 30 => TTi18n::gettext('Complete'));
             break;
         case 'columns':
             $retval = array('-4070-user' => TTi18n::gettext('Employee Name'), '-4080-reviewer_user' => TTi18n::gettext('Reviewer Name'), '-1170-start_date' => TTi18n::gettext('Start Date'), '-1180-end_date' => TTi18n::gettext('End Date'), '-4090-due_date' => TTi18n::gettext('Due Date'), '-1040-type' => TTi18n::gettext('Type'), '-1060-term' => TTi18n::gettext('Terms'), '-1010-severity' => TTi18n::gettext('Severity/Importance'), '-1020-status' => TTi18n::gettext('Status'), '-1050-rating' => TTi18n::gettext('Overall Rating'), '-1200-note' => TTi18n::gettext('Notes'), '-1300-tag' => TTi18n::gettext('Tags'), '-2000-created_by' => TTi18n::gettext('Created By'), '-2010-created_date' => TTi18n::gettext('Created Date'), '-2020-updated_by' => TTi18n::gettext('Updated By'), '-2030-updated_date' => TTi18n::gettext('Updated Date'));
             break;
         case 'list_columns':
             $retval = Misc::arrayIntersectByKey($this->getOptions('default_display_columns'), Misc::trimSortPrefix($this->getOptions('columns')));
             break;
         case 'default_display_columns':
             //Columns that are displayed by default.
             $retval = array('user', 'reviewer_user', 'type', 'term', 'severity', 'start_date', 'end_date', 'due_date');
             break;
         case 'unique_columns':
             //Columns that are unique, and disabled for mass editing.
             $retval = array();
             break;
     }
     return $retval;
 }
コード例 #14
0
 function _getFactoryOptions($name)
 {
     $retval = NULL;
     switch ($name) {
         case 'status':
             $retval = array(10 => TTi18n::gettext('ENABLED'), 20 => TTi18n::gettext('DISABLED'));
             break;
         case 'country_currency':
             //Country to primary currency mappings.
             $retval = array('AF' => 'AFA', 'AL' => 'ALL', 'DZ' => 'DZD', 'AS' => 'USD', 'AD' => 'EUR', 'AO' => 'AON', 'AI' => 'XCD', 'AQ' => 'NOK', 'AG' => 'XCD', 'AR' => 'ARA', 'AM' => 'AMD', 'AW' => 'AWG', 'AU' => 'AUD', 'AT' => 'EUR', 'AZ' => 'AZM', 'BS' => 'BSD', 'BH' => 'BHD', 'BD' => 'BDT', 'BB' => 'BBD', 'BY' => 'BYR', 'BE' => 'EUR', 'BZ' => 'BZD', 'BJ' => 'XAF', 'BM' => 'BMD', 'BT' => 'BTN', 'BO' => 'BOB', 'BA' => 'BAM', 'BW' => 'BWP', 'BV' => 'NOK', 'BR' => 'BRR', 'IO' => 'GBP', 'BN' => 'BND', 'BG' => 'BGL', 'BF' => 'XAF', 'BI' => 'BIF', 'KH' => 'KHR', 'CM' => 'XAF', 'CA' => 'CAD', 'CV' => 'CVE', 'KY' => 'KYD', 'CF' => 'XAF', 'TD' => 'XAF', 'CL' => 'CLF', 'CN' => 'CNY', 'CX' => 'AUD', 'CC' => 'AUD', 'CO' => 'COP', 'KM' => 'KMF', 'CG' => 'XAF', 'CK' => 'NZD', 'CR' => 'CRC', 'HR' => 'HRK', 'CU' => 'CUP', 'CY' => 'CYP', 'CZ' => 'CZK', 'DK' => 'DKK', 'DJ' => 'DJF', 'DM' => 'XCD', 'DO' => 'DOP', 'TP' => 'TPE', 'EC' => 'USD', 'EG' => 'EGP', 'SV' => 'SVC', 'GQ' => 'XAF', 'ER' => 'ERN', 'EE' => 'EEK', 'ET' => 'ETB', 'FK' => 'FKP', 'FO' => 'DKK', 'FJ' => 'FJD', 'FI' => 'EUR', 'FR' => 'EUR', 'FX' => 'EUR', 'GF' => 'EUR', 'PF' => 'XPF', 'TF' => 'EUR', 'GA' => 'XAF', 'GM' => 'GMD', 'GE' => 'GEL', 'DE' => 'EUR', 'GH' => 'GHC', 'GI' => 'GIP', 'GR' => 'EUR', 'GL' => 'DKK', 'GD' => 'XCD', 'GP' => 'EUR', 'GU' => 'USD', 'GT' => 'GTQ', 'GN' => 'GNS', 'GW' => 'GWP', 'GY' => 'GYD', 'HT' => 'HTG', 'HM' => 'AUD', 'VA' => 'EUR', 'HN' => 'HNL', 'HK' => 'HKD', 'HU' => 'HUF', 'IS' => 'ISK', 'IN' => 'INR', 'ID' => 'IDR', 'IR' => 'IRR', 'IQ' => 'IQD', 'IE' => 'EUR', 'IL' => 'ILS', 'IT' => 'EUR', 'CI' => 'XAF', 'JM' => 'JMD', 'JP' => 'JPY', 'JO' => 'JOD', 'KZ' => 'KZT', 'KE' => 'KES', 'KI' => 'AUD', 'KP' => 'KPW', 'KR' => 'KRW', 'KW' => 'KWD', 'KG' => 'KGS', 'LA' => 'LAK', 'LV' => 'LVL', 'LB' => 'LBP', 'LS' => 'LSL', 'LR' => 'LRD', 'LY' => 'LYD', 'LI' => 'CHF', 'LT' => 'LTL', 'LU' => 'EUR', 'MO' => 'MOP', 'MK' => 'MKD', 'MG' => 'MGF', 'MW' => 'MWK', 'MY' => 'MYR', 'MV' => 'MVR', 'ML' => 'XAF', 'MT' => 'MTL', 'MH' => 'USD', 'MQ' => 'EUR', 'MR' => 'MRO', 'MU' => 'MUR', 'YT' => 'EUR', 'MX' => 'MXN', 'FM' => 'USD', 'MD' => 'MDL', 'MC' => 'EUR', 'MN' => 'MNT', 'MS' => 'XCD', 'MA' => 'MAD', 'MZ' => 'MZM', 'MM' => 'MMK', 'NA' => 'NAD', 'NR' => 'AUD', 'NP' => 'NPR', 'NL' => 'EUR', 'AN' => 'ANG', 'NC' => 'XPF', 'NZ' => 'NZD', 'NI' => 'NIC', 'NE' => 'XOF', 'NG' => 'NGN', 'NU' => 'NZD', 'NF' => 'AUD', 'MP' => 'USD', 'NO' => 'NOK', 'OM' => 'OMR', 'PK' => 'PKR', 'PW' => 'USD', 'PA' => 'PAB', 'PG' => 'PGK', 'PY' => 'PYG', 'PE' => 'PEI', 'PH' => 'PHP', 'PN' => 'NZD', 'PL' => 'PLN', 'PT' => 'EUR', 'PR' => 'USD', 'QA' => 'QAR', 'RE' => 'EUR', 'RO' => 'ROL', 'RU' => 'RUB', 'RW' => 'RWF', 'KN' => 'XCD', 'LC' => 'XCD', 'VC' => 'XCD', 'WS' => 'WST', 'SM' => 'EUR', 'ST' => 'STD', 'SA' => 'SAR', 'SN' => 'XOF', 'CS' => 'CSD', 'SC' => 'SCR', 'SL' => 'SLL', 'SG' => 'SGD', 'SK' => 'SKK', 'SI' => 'SIT', 'SB' => 'SBD', 'SO' => 'SOS', 'ZA' => 'ZAR', 'GS' => 'GBP', 'ES' => 'EUR', 'LK' => 'LKR', 'SH' => 'SHP', 'PM' => 'EUR', 'SD' => 'SDP', 'SR' => 'SRG', 'SJ' => 'NOK', 'SZ' => 'SZL', 'SE' => 'SEK', 'CH' => 'CHF', 'SY' => 'SYP', 'TW' => 'TWD', 'TJ' => 'TJR', 'TZ' => 'TZS', 'TH' => 'THB', 'TG' => 'XAF', 'TK' => 'NZD', 'TO' => 'TOP', 'TT' => 'TTD', 'TN' => 'TND', 'TR' => 'TRL', 'TM' => 'TMM', 'TC' => 'USD', 'TV' => 'AUD', 'UG' => 'UGS', 'UA' => 'UAH', 'SU' => 'SUR', 'AE' => 'AED', 'GB' => 'GBP', 'US' => 'USD', 'UM' => 'USD', 'UY' => 'UYU', 'UZ' => 'UZS', 'VU' => 'VUV', 'VE' => 'VEB', 'VN' => 'VND', 'VG' => 'USD', 'VI' => 'USD', 'WF' => 'XPF', 'XO' => 'XOF', 'EH' => 'MAD', 'YE' => 'YER', 'ZM' => 'ZMW', 'ZW' => 'ZWD');
             break;
         case 'round_decimal_places':
             $retval = array(0 => 0, 1 => 1, 2 => 2, 3 => 3, 4 => 4);
             break;
         case 'columns':
             $retval = array('-1000-status' => TTi18n::gettext('Status'), '-1010-name' => TTi18n::gettext('Name'), '-1020-symbol' => TTi18n::gettext('Symbol'), '-1020-iso_code' => TTi18n::gettext('ISO Code'), '-1030-conversion_rate' => TTi18n::gettext('Conversion Rate'), '-1040-auto_update' => TTi18n::gettext('Auto Update'), '-1050-actual_rate' => TTi18n::gettext('Actual Rate'), '-1060-actual_rate_updated_date' => TTi18n::gettext('Last Downloaded Date'), '-1070-rate_modify_percent' => TTi18n::gettext('Rate Modify Percent'), '-1080-is_default' => TTi18n::gettext('Default Currency'), '-1090-is_base' => TTi18n::gettext('Base Currency'), '-1100-round_decimal_places' => TTi18n::gettext('Round Decimal Places'), '-2000-created_by' => TTi18n::gettext('Created By'), '-2010-created_date' => TTi18n::gettext('Created Date'), '-2020-updated_by' => TTi18n::gettext('Updated By'), '-2030-updated_date' => TTi18n::gettext('Updated Date'));
             break;
         case 'list_columns':
             $retval = Misc::arrayIntersectByKey(array('name', 'iso_code', 'status'), Misc::trimSortPrefix($this->getOptions('columns')));
             break;
         case 'default_display_columns':
             //Columns that are displayed by default.
             $retval = array('status', 'name', 'iso_code', 'conversion_rate', 'is_default', 'is_base');
             break;
         case 'unique_columns':
             //Columns that are unique, and disabled for mass editing.
             $retval = array('name', 'is_default', 'is_base');
             break;
     }
     return $retval;
 }
コード例 #15
0
 function _getFactoryOptions($name)
 {
     $retval = NULL;
     switch ($name) {
         case 'type':
             $retval = array(2 => TTi18n::gettext('Company'), 4 => TTi18n::gettext('Branch'), 5 => TTi18n::gettext('Department'), 10 => TTi18n::gettext('Employee'), 12 => TTi18n::gettext('Employee Title'), 15 => TTi18n::gettext('Punch'), 20 => TTi18n::gettext('Job'), 30 => TTi18n::gettext('Task'), 50 => TTi18n::gettext('Client'), 55 => TTi18n::gettext('Client Contact'), 60 => TTi18n::gettext('Product'), 70 => TTi18n::gettext('Invoice'), 80 => TTi18n::gettext('Document'));
             break;
         case 'columns':
             $retval = array('-1010-type' => TTi18n::gettext('Type'), '-1020-other_id1' => TTi18n::gettext('Other ID1'), '-1020-other_id2' => TTi18n::gettext('Other ID2'), '-1020-other_id3' => TTi18n::gettext('Other ID3'), '-1020-other_id4' => TTi18n::gettext('Other ID4'), '-1020-other_id5' => TTi18n::gettext('Other ID5'), '-2000-created_by' => TTi18n::gettext('Created By'), '-2010-created_date' => TTi18n::gettext('Created Date'), '-2020-updated_by' => TTi18n::gettext('Updated By'), '-2030-updated_date' => TTi18n::gettext('Updated Date'));
             break;
         case 'list_columns':
             $retval = Misc::arrayIntersectByKey($this->getOptions('default_display_columns'), Misc::trimSortPrefix($this->getOptions('columns')));
             break;
         case 'default_display_columns':
             //Columns that are displayed by default.
             $retval = array('type_id', 'type', 'other_id1', 'other_id2', 'other_id3', 'other_id4', 'other_id5');
             break;
         case 'unique_columns':
             //Columns that are unique, and disabled for mass editing.
             $retval = array();
             break;
         case 'linked_columns':
             //Columns that are linked together, mainly for Mass Edit, if one changes, they all must.
             $retval = array();
             break;
     }
     return $retval;
 }
コード例 #16
0
 function _getFactoryOptions($name)
 {
     $retval = NULL;
     switch ($name) {
         case 'status':
             $retval = array(10 => TTi18n::gettext('INCOMPLETE'), 20 => TTi18n::gettext('OPEN'), 30 => TTi18n::gettext('PENDING AUTHORIZATION'), 40 => TTi18n::gettext('AUTHORIZATION OPEN'), 45 => TTi18n::gettext('PENDING EMPLOYEE VERIFICATION'), 50 => TTi18n::gettext('Verified'), 55 => TTi18n::gettext('AUTHORIZATION DECLINED'), 60 => TTi18n::gettext('DISABLED'));
             break;
         case 'columns':
             $retval = array('-1010-first_name' => TTi18n::gettext('First Name'), '-1020-last_name' => TTi18n::gettext('Last Name'), '-1060-title' => TTi18n::gettext('Title'), '-1070-user_group' => TTi18n::gettext('Group'), '-1080-default_branch' => TTi18n::gettext('Branch'), '-1090-default_department' => TTi18n::gettext('Department'), '-1110-start_date' => TTi18n::gettext('Start Date'), '-1112-end_date' => TTi18n::gettext('End Date'), '-1115-transaction_date' => TTi18n::gettext('Transaction Date'), '-1120-status' => TTi18n::gettext('Status'), '-2000-created_by' => TTi18n::gettext('Created By'), '-2010-created_date' => TTi18n::gettext('Created Date'), '-2020-updated_by' => TTi18n::gettext('Updated By'), '-2030-updated_date' => TTi18n::gettext('Updated Date'));
             break;
         case 'list_columns':
             $retval = Misc::arrayIntersectByKey($this->getOptions('default_display_columns'), Misc::trimSortPrefix($this->getOptions('columns')));
             break;
         case 'default_display_columns':
             //Columns that are displayed by default.
             $retval = array('first_name', 'last_name', 'start_date', 'end_date', 'status');
             break;
         case 'unique_columns':
             //Columns that are unique, and disabled for mass editing.
             $retval = array();
             break;
         case 'linked_columns':
             //Columns that are linked together, mainly for Mass Edit, if one changes, they all must.
             $retval = array();
             break;
     }
     return $retval;
 }
コード例 #17
0
 function _getFactoryOptions($name)
 {
     $retval = NULL;
     switch ($name) {
         case 'type':
             $retval = array(10 => TTi18n::gettext('Standard'), 20 => TTi18n::gettext('Calendar Based'), 30 => TTi18n::gettext('Hour Based'));
             break;
         case 'apply_frequency':
             $retval = array(10 => TTi18n::gettext('each Pay Period'), 20 => TTi18n::gettext('Annually'), 30 => TTi18n::gettext('Monthly'), 40 => TTi18n::gettext('Weekly'));
             break;
         case 'columns':
             $retval = array('-1010-type' => TTi18n::gettext('Type'), '-1030-name' => TTi18n::gettext('Name'), '-2000-created_by' => TTi18n::gettext('Created By'), '-2010-created_date' => TTi18n::gettext('Created Date'), '-2020-updated_by' => TTi18n::gettext('Updated By'), '-2030-updated_date' => TTi18n::gettext('Updated Date'));
             break;
         case 'list_columns':
             $retval = Misc::arrayIntersectByKey($this->getOptions('default_display_columns'), Misc::trimSortPrefix($this->getOptions('columns')));
             break;
         case 'default_display_columns':
             //Columns that are displayed by default.
             $retval = array('type', 'name', 'updated_date', 'updated_by');
             break;
         case 'unique_columns':
             //Columns that are unique, and disabled for mass editing.
             $retval = array('name');
             break;
         case 'linked_columns':
             //Columns that are linked together, mainly for Mass Edit, if one changes, they all must.
             $retval = array();
             break;
     }
     return $retval;
 }
コード例 #18
0
 /**
  * Get company data for one or more companyes.
  * @param array $data filter data
  * @return array
  */
 function getCompany($data = NULL, $disable_paging = FALSE)
 {
     if (!$this->getPermissionObject()->Check('company', 'enabled') or !($this->getPermissionObject()->Check('company', 'view') or $this->getPermissionObject()->Check('company', 'view_own') or $this->getPermissionObject()->Check('company', 'view_child'))) {
         //return $this->getPermissionObject()->PermissionDenied();
         $data['filter_columns'] = $this->handlePermissionFilterColumns(isset($data['filter_columns']) ? $data['filter_columns'] : NULL, Misc::trimSortPrefix($this->getOptions('list_columns')));
     }
     $data = $this->initializeFilterAndPager($data, $disable_paging);
     if (!$this->getPermissionObject()->Check('company', 'view')) {
         //Force ID to current company.
         $data['filter_data']['id'] = $this->getCurrentCompanyObject()->getId();
     }
     //FIXME: This filters company by created_by.
     //if ( $this->getPermissionObject()->Check('company','view') == FALSE AND $this->getPermissionObject()->Check('company','view_own') == TRUE ) {
     //	$data['filter_data']['permission_children_ids'] = $this->getCurrentUserObject()->getId(); //The created_by is unlikely to be the first user in the system, so this isn't going to work.
     //}
     Debug::Arr($data, 'Data: ', __FILE__, __LINE__, __METHOD__, 10);
     $blf = TTnew('CompanyListFactory');
     $blf->getAPISearchByCompanyIdAndArrayCriteria($this->getCurrentCompanyObject()->getId(), $data['filter_data'], $data['filter_items_per_page'], $data['filter_page'], NULL, $data['filter_sort']);
     Debug::Text('Record Count: ' . $blf->getRecordCount(), __FILE__, __LINE__, __METHOD__, 10);
     if ($blf->getRecordCount() > 0) {
         $this->getProgressBarObject()->start($this->getAMFMessageID(), $blf->getRecordCount());
         $this->setPagerObject($blf);
         foreach ($blf as $b_obj) {
             $retarr[] = $b_obj->getObjectAsArray($data['filter_columns']);
             $this->getProgressBarObject()->set($this->getAMFMessageID(), $blf->getCurrentRow());
         }
         $this->getProgressBarObject()->stop($this->getAMFMessageID());
         return $this->returnHandler($retarr);
     }
     return $this->returnHandler(TRUE);
     //No records returned.
 }
コード例 #19
0
 function _getFactoryOptions($name)
 {
     $retval = NULL;
     switch ($name) {
         case 'type':
             //Exception life-cycle
             //
             // - Exception occurs, such as missed out punch, in late.
             //   - If the exception is pre-mature, we wait 16-24hrs for it to become a full-blown exception
             // - If the exception requires authorization, it sits in a pending state waiting for supervsior intervention.
             // - Supervisor authorizes the exception, or makes a correction, leaves a note or something.
             //	 - Exception no longer appears on timesheet/exception list.
             $retval = array(5 => TTi18n::gettext('Pre-Mature'), 30 => TTi18n::gettext('PENDING AUTHORIZATION'), 40 => TTi18n::gettext('AUTHORIZATION OPEN'), 50 => TTi18n::gettext('ACTIVE'), 55 => TTi18n::gettext('AUTHORIZATION DECLINED'), 60 => TTi18n::gettext('DISABLED'), 70 => TTi18n::gettext('Corrected'));
             break;
         case 'columns':
             $retval = array('-1000-first_name' => TTi18n::gettext('First Name'), '-1002-last_name' => TTi18n::gettext('Last Name'), '-1010-title' => TTi18n::gettext('Title'), '-1039-group' => TTi18n::gettext('Group'), '-1050-default_branch' => TTi18n::gettext('Default Branch'), '-1060-default_department' => TTi18n::gettext('Default Department'), '-1070-branch' => TTi18n::gettext('Branch'), '-1080-department' => TTi18n::gettext('Department'), '-1090-country' => TTi18n::gettext('Country'), '-1100-province' => TTi18n::gettext('Province'), '-1120-date_stamp' => TTi18n::gettext('Date'), '-1130-severity' => TTi18n::gettext('Severity'), '-1140-exception_policy_type' => TTi18n::gettext('Exception'), '-1150-exception_policy_type_id' => TTi18n::gettext('Code'), '-1160-policy_group' => TTi18n::gettext('Policy Group'), '-1170-permission_group' => TTi18n::gettext('Permission Group'), '-1200-pay_period_schedule' => TTi18n::gettext('Pay Period Schedule'), '-2000-created_by' => TTi18n::gettext('Created By'), '-2010-created_date' => TTi18n::gettext('Created Date'), '-2020-updated_by' => TTi18n::gettext('Updated By'), '-2030-updated_date' => TTi18n::gettext('Updated Date'));
             break;
         case 'list_columns':
             $retval = Misc::arrayIntersectByKey(array('date_stamp', 'severity', 'exception_policy_type', 'exception_policy_type_id'), Misc::trimSortPrefix($this->getOptions('columns')));
             break;
         case 'default_display_columns':
             //Columns that are displayed by default.
             $retval = array('first_name', 'last_name', 'date_stamp', 'severity', 'exception_policy_type', 'exception_policy_type_id');
             break;
         case 'unique_columns':
             //Columns that are unique, and disabled for mass editing.
             $retval = array();
             break;
         case 'linked_columns':
             //Columns that are linked together, mainly for Mass Edit, if one changes, they all must.
             $retval = array();
     }
     return $retval;
 }
コード例 #20
0
 function _getFactoryOptions($name)
 {
     $retval = NULL;
     switch ($name) {
         case 'type':
             $retval = array(10 => TTi18n::gettext('Missed Punch'), 20 => TTi18n::gettext('Punch Adjustment'), 30 => TTi18n::gettext('Absence (incl. Vacation)'), 40 => TTi18n::gettext('Schedule Adjustment'), 100 => TTi18n::gettext('Other'));
             break;
         case 'status':
             $retval = array(10 => TTi18n::gettext('INCOMPLETE'), 20 => TTi18n::gettext('OPEN'), 30 => TTi18n::gettext('PENDING'), 40 => TTi18n::gettext('AUTHORIZATION OPEN'), 50 => TTi18n::gettext('AUTHORIZED'), 55 => TTi18n::gettext('DECLINED'), 60 => TTi18n::gettext('DISABLED'));
             break;
         case 'columns':
             $retval = array('-1010-first_name' => TTi18n::gettext('First Name'), '-1020-last_name' => TTi18n::gettext('Last Name'), '-1060-title' => TTi18n::gettext('Title'), '-1070-user_group' => TTi18n::gettext('Group'), '-1080-default_branch' => TTi18n::gettext('Branch'), '-1090-default_department' => TTi18n::gettext('Department'), '-1110-date_stamp' => TTi18n::gettext('Date'), '-1120-status' => TTi18n::gettext('Status'), '-1130-type' => TTi18n::gettext('Type'), '-2000-created_by' => TTi18n::gettext('Created By'), '-2010-created_date' => TTi18n::gettext('Created Date'), '-2020-updated_by' => TTi18n::gettext('Updated By'), '-2030-updated_date' => TTi18n::gettext('Updated Date'));
             break;
         case 'list_columns':
             $retval = Misc::arrayIntersectByKey(array('date_stamp', 'status', 'type'), Misc::trimSortPrefix($this->getOptions('columns')));
             break;
         case 'default_display_columns':
             //Columns that are displayed by default.
             $retval = array('first_name', 'last_name', 'type', 'date_stamp', 'status');
             break;
         case 'unique_columns':
             //Columns that are unique, and disabled for mass editing.
             $retval = array();
             break;
         case 'linked_columns':
             //Columns that are linked together, mainly for Mass Edit, if one changes, they all must.
             $retval = array();
             break;
     }
     return $retval;
 }
コード例 #21
0
 /**
  * Get user membership data for one or more memberships.
  * @param array $data filter data
  * @return array
  */
 function getUserMembership($data = NULL, $disable_paging = FALSE)
 {
     if (!$this->getPermissionObject()->Check('user_membership', 'enabled') or !($this->getPermissionObject()->Check('user_membership', 'view') or $this->getPermissionObject()->Check('user_membership', 'view_own') or $this->getPermissionObject()->Check('user_membership', 'view_child'))) {
         //return $this->getPermissionObject()->PermissionDenied();
         //Rather then permission denied, restrict to just 'list_view' columns.
         $data['filter_columns'] = $this->handlePermissionFilterColumns(isset($data['filter_columns']) ? $data['filter_columns'] : NULL, Misc::trimSortPrefix($this->getOptions('list_columns')));
     }
     $data = $this->initializeFilterAndPager($data, $disable_paging);
     $data['filter_data']['permission_children_ids'] = $this->getPermissionObject()->getPermissionChildren('user_membership', 'view');
     if (isset($data['filter_data']['company_id']) and $data['filter_data']['company_id'] > 0 and ($this->getPermissionObject()->Check('company', 'enabled') and $this->getPermissionObject()->Check('company', 'edit'))) {
         $company_id = $data['filter_data']['company_id'];
     } else {
         $company_id = $this->getCurrentCompanyObject()->getId();
     }
     $umlf = TTnew('UserMembershipListFactory');
     $umlf->getAPISearchByCompanyIdAndArrayCriteria($company_id, $data['filter_data'], $data['filter_items_per_page'], $data['filter_page'], NULL, $data['filter_sort']);
     Debug::Text('Record Count: ' . $umlf->getRecordCount(), __FILE__, __LINE__, __METHOD__, 10);
     if ($umlf->getRecordCount() > 0) {
         $this->getProgressBarObject()->start($this->getAMFMessageID(), $umlf->getRecordCount());
         $this->setPagerObject($umlf);
         foreach ($umlf as $s_obj) {
             $retarr[] = $s_obj->getObjectAsArray($data['filter_columns'], $data['filter_data']['permission_children_ids']);
             $this->getProgressBarObject()->set($this->getAMFMessageID(), $umlf->getCurrentRow());
         }
         $this->getProgressBarObject()->stop($this->getAMFMessageID());
         return $this->returnHandler($retarr);
     }
     return $this->returnHandler(TRUE);
     //No records returned.
 }
コード例 #22
0
 function _getFactoryOptions($name)
 {
     $retval = NULL;
     switch ($name) {
         case 'status':
             $retval = array(10 => TTi18n::gettext('Enabled (Required)'), 15 => TTi18n::gettext('Enabled (Optional)'), 20 => TTi18n::gettext('Disabled'));
             break;
         case 'type':
             $retval = array(10 => TTi18n::gettext('Scale Rating'), 20 => TTi18n::gettext('Yes/No'), 30 => TTi18n::gettext('Text'));
             break;
         case 'columns':
             $retval = array('-1000-name' => TTi18n::gettext('Name'), '-1040-description' => TTi18n::gettext('Description'), '-1050-type' => TTi18n::getText('Type'), '-4050-minimum_rate' => TTi18n::gettext('Minimum Rating'), '-4060-maximum_rate' => TTi18n::gettext('Maximum Rating'), '-1010-status' => TTi18n::gettext('Status'), '-1300-tag' => TTi18n::gettext('Tags'), '-2000-created_by' => TTi18n::gettext('Created By'), '-2010-created_date' => TTi18n::gettext('Created Date'), '-2020-updated_by' => TTi18n::gettext('Updated By'), '-2030-updated_date' => TTi18n::gettext('Updated Date'));
             break;
         case 'list_columns':
             $retval = Misc::arrayIntersectByKey($this->getOptions('default_display_columns'), Misc::trimSortPrefix($this->getOptions('columns')));
             break;
         case 'default_display_columns':
             //Columns that are displayed by default.
             $retval = array('name', 'description', 'type', 'minimum_rate', 'maximum_rate');
             break;
         case 'unique_columns':
             //Columns that are unique, and disabled for mass editing.
             $retval = array('name');
             break;
     }
     return $retval;
 }
コード例 #23
0
 function _getFactoryOptions($name)
 {
     $retval = NULL;
     switch ($name) {
         case 'ach_transaction_type':
             //ACH transactions require a transaction code that matches the bank account.
             $retval = array(22 => TTi18n::getText('Checking'), 32 => TTi18n::getText('Savings'));
             break;
         case 'columns':
             $retval = array('-1010-first_name' => TTi18n::gettext('First Name'), '-1020-last_name' => TTi18n::gettext('Last Name'), '-1090-title' => TTi18n::gettext('Title'), '-1099-user_group' => TTi18n::gettext('Group'), '-1100-default_branch' => TTi18n::gettext('Branch'), '-1110-default_department' => TTi18n::gettext('Department'), '-5010-transit' => TTi18n::gettext('Transit/Routing'), '-5020-account' => TTi18n::gettext('Account'), '-5030-institution' => TTi18n::gettext('Institution'), '-2000-created_by' => TTi18n::gettext('Created By'), '-2010-created_date' => TTi18n::gettext('Created Date'), '-2020-updated_by' => TTi18n::gettext('Updated By'), '-2030-updated_date' => TTi18n::gettext('Updated Date'));
             break;
         case 'list_columns':
             $retval = Misc::arrayIntersectByKey($this->getOptions('default_display_columns'), Misc::trimSortPrefix($this->getOptions('columns')));
             break;
         case 'default_display_columns':
             //Columns that are displayed by default.
             $retval = array('first_name', 'last_name', 'account', 'institution');
             break;
         case 'linked_columns':
             //Columns that are linked together, mainly for Mass Edit, if one changes, they all must.
             $retval = array();
             break;
     }
     return $retval;
 }
コード例 #24
0
 function _getFactoryOptions($name)
 {
     $retval = NULL;
     switch ($name) {
         case 'status':
             $retval = array(10 => TTi18n::gettext('System'), 20 => TTi18n::gettext('Worked'), 30 => TTi18n::gettext('Absence'));
             break;
         case 'type':
             $retval = array(10 => TTi18n::gettext('Total'), 20 => TTi18n::gettext('Regular'), 30 => TTi18n::gettext('Overtime'), 40 => TTi18n::gettext('Premium'), 100 => TTi18n::gettext('Lunch'), 110 => TTi18n::gettext('Break'));
             break;
         case 'status_type':
             $retval = array(10 => array(10, 20, 30, 40, 100, 110), 20 => array(10), 30 => array(10));
             break;
         case 'columns':
             $retval = array('-1000-first_name' => TTi18n::gettext('First Name'), '-1002-last_name' => TTi18n::gettext('Last Name'), '-1005-user_status' => TTi18n::gettext('Employee Status'), '-1010-title' => TTi18n::gettext('Title'), '-1039-group' => TTi18n::gettext('Group'), '-1040-default_branch' => TTi18n::gettext('Default Branch'), '-1050-default_department' => TTi18n::gettext('Default Department'), '-1160-branch' => TTi18n::gettext('Branch'), '-1170-department' => TTi18n::gettext('Department'), '-1200-type' => TTi18n::gettext('Type'), '-1202-status' => TTi18n::gettext('Status'), '-1210-date_stamp' => TTi18n::gettext('Date'), '-1290-total_time' => TTi18n::gettext('Time'), '-2000-created_by' => TTi18n::gettext('Created By'), '-2010-created_date' => TTi18n::gettext('Created Date'), '-2020-updated_by' => TTi18n::gettext('Updated By'), '-2030-updated_date' => TTi18n::gettext('Updated Date'));
             break;
         case 'list_columns':
             $retval = Misc::arrayIntersectByKey($this->getOptions('default_display_columns'), Misc::trimSortPrefix($this->getOptions('columns')));
             break;
         case 'default_display_columns':
             //Columns that are displayed by default.
             $retval = array('status', 'time_stamp');
             break;
         case 'unique_columns':
             //Columns that are unique, and disabled for mass editing.
             $retval = array();
             break;
         case 'linked_columns':
             //Columns that are linked together, mainly for Mass Edit, if one changes, they all must.
             $retval = array();
             break;
     }
     return $retval;
 }
コード例 #25
0
 function _getFactoryOptions($name)
 {
     $retval = NULL;
     switch ($name) {
         case 'status':
             $sf = TTNew('ScheduleFactory');
             $retval = $sf->getOptions('status');
             break;
         case 'columns':
             $retval = array('-1010-week' => TTi18n::gettext('Week'), '-1101-sun' => TTi18n::gettext('S'), '-1102-mon' => TTi18n::gettext('M'), '-1103-tue' => TTi18n::gettext('T'), '-1104-wed' => TTi18n::gettext('W'), '-1105-thu' => TTi18n::gettext('T'), '-1106-fri' => TTi18n::gettext('F'), '-1107-sat' => TTi18n::gettext('S'), '-1200-start_time' => TTi18n::gettext('In'), '-1210-end_time' => TTi18n::gettext('Out'), '-1220-schedule_policy' => TTi18n::gettext('Schedule Policy'), '-1225-status' => TTi18n::gettext('Status'), '-1230-branch' => TTi18n::gettext('Branch'), '-1240-department' => TTi18n::gettext('Department'), '-1250-job' => TTi18n::gettext('Job'), '-1260-job_item' => TTi18n::gettext('Task'), '-2000-created_by' => TTi18n::gettext('Created By'), '-2010-created_date' => TTi18n::gettext('Created Date'), '-2020-updated_by' => TTi18n::gettext('Updated By'), '-2030-updated_date' => TTi18n::gettext('Updated Date'));
             break;
         case 'list_columns':
             $retval = Misc::arrayIntersectByKey($this->getOptions('default_display_columns'), Misc::trimSortPrefix($this->getOptions('columns')));
             break;
         case 'default_display_columns':
             //Columns that are displayed by default.
             $retval = array('week', 'sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'start_time', 'end_time', 'schedule_policy', 'branch', 'department', 'job', 'job_item');
             break;
         case 'unique_columns':
             //Columns that are unique, and disabled for mass editing.
             $retval = array();
             break;
         case 'linked_columns':
             //Columns that are linked together, mainly for Mass Edit, if one changes, they all must.
             $retval = array();
             break;
     }
     return $retval;
 }
コード例 #26
0
 function _getFactoryOptions($name)
 {
     $retval = NULL;
     switch ($name) {
         case 'object_type':
             $retval = array(90 => 'timesheet', 200 => 'expense', 1010 => 'request_punch', 1020 => 'request_punch_adjust', 1030 => 'request_absence', 1040 => 'request_schedule', 1100 => 'request_other');
             break;
         case 'columns':
             $retval = array('-1010-created_by' => TTi18n::gettext('Name'), '-1020-created_date' => TTi18n::gettext('Date'), '-1030-authorized' => TTi18n::gettext('Authorized'));
             break;
         case 'list_columns':
             $retval = Misc::arrayIntersectByKey($this->getOptions('default_display_columns'), Misc::trimSortPrefix($this->getOptions('columns')));
             break;
         case 'default_display_columns':
             //Columns that are displayed by default.
             $retval = array('created_by', 'created_date', 'authorized');
             break;
         case 'unique_columns':
             //Columns that are unique, and disabled for mass editing.
             $retval = array();
             break;
         case 'linked_columns':
             //Columns that are linked together, mainly for Mass Edit, if one changes, they all must.
             $retval = array();
             break;
     }
     return $retval;
 }
コード例 #27
0
 function _getFactoryOptions($name)
 {
     $retval = NULL;
     switch ($name) {
         case 'type':
             $retval = array(10 => TTi18n::gettext('Auto-Deduct'), 15 => TTi18n::gettext('Auto-Add'), 20 => TTi18n::gettext('Normal'));
             break;
         case 'auto_detect_type':
             $retval = array(10 => TTi18n::gettext('Time Window'), 20 => TTi18n::gettext('Punch Time'));
             break;
         case 'columns':
             $retval = array('-1010-type' => TTi18n::gettext('Type'), '-1020-name' => TTi18n::gettext('Name'), '-1030-amount' => TTi18n::gettext('Break Time'), '-1040-trigger_time' => TTi18n::gettext('Active After'), '-1050-auto_detect_type' => TTi18n::gettext('Auto Detect Breaks By'), '-1100-include_break_punch_time' => TTi18n::gettext('Include Break Punch'), '-1110-include_multiple_breaks' => TTi18n::gettext('Include Multiple Breaks'), '-2000-created_by' => TTi18n::gettext('Created By'), '-2010-created_date' => TTi18n::gettext('Created Date'), '-2020-updated_by' => TTi18n::gettext('Updated By'), '-2030-updated_date' => TTi18n::gettext('Updated Date'));
             break;
         case 'list_columns':
             $retval = Misc::arrayIntersectByKey($this->getOptions('default_display_columns'), Misc::trimSortPrefix($this->getOptions('columns')));
             break;
         case 'default_display_columns':
             //Columns that are displayed by default.
             $retval = array('name', 'type', 'amount', 'updated_date', 'updated_by');
             break;
         case 'unique_columns':
             //Columns that are unique, and disabled for mass editing.
             $retval = array('name');
             break;
         case 'linked_columns':
             //Columns that are linked together, mainly for Mass Edit, if one changes, they all must.
             $retval = array();
             break;
     }
     return $retval;
 }
コード例 #28
0
 function _getFactoryOptions($name)
 {
     $retval = NULL;
     switch ($name) {
         case 'action':
             $retval = array(10 => TTi18n::gettext('Add'), 20 => TTi18n::gettext('Edit'), 30 => TTi18n::gettext('Delete'), 31 => TTi18n::gettext('Delete (F)'), 40 => TTi18n::gettext('UnDelete'), 100 => TTi18n::gettext('Login'), 110 => TTi18n::gettext('Logout'), 200 => TTi18n::gettext('Allow'), 210 => TTi18n::gettext('Deny'), 500 => TTi18n::gettext('Notice'), 510 => TTi18n::gettext('Warning'), 900 => TTi18n::gettext('Other'));
             break;
         case 'table_name':
             $retval = array('authentication' => TTi18n::getText('Authentication'), 'company' => TTi18n::getText('Company'), 'branch' => TTi18n::getText('Branch'), 'department' => TTi18n::getText('Department'), 'currency' => TTi18n::getText('Currency'), 'accrual' => TTi18n::getText('Accrual'), 'authorizations' => TTi18n::getText('Authorizations'), 'request' => TTi18n::getText('Request'), 'message' => TTi18n::getText('Messages'), 'message_control' => TTi18n::getText('Messages'), 'holidays' => TTi18n::getText('Holidays'), 'bank_account' => TTi18n::getText('Bank Account'), 'roe' => TTi18n::getText('Record of Employment'), 'station' => TTi18n::getText('Station'), 'station_user_group' => TTi18n::getText('Station Employee Group'), 'station_branch' => TTi18n::getText('Station Branch'), 'station_department' => TTi18n::getText('Station Department'), 'station_include_user' => TTi18n::getText('Station Include Employee'), 'station_exclude_user' => TTi18n::getText('Station Exclude Employee'), 'station' => TTi18n::getText('Station'), 'punch' => TTi18n::getText('Punch'), 'punch_control' => TTi18n::getText('Punch Control'), 'exception' => TTi18n::getText('Exceptions'), 'schedule' => TTi18n::getText('Schedule'), 'other_field' => TTi18n::getText('Other Field'), 'system_setting' => TTi18n::getText('System Setting'), 'cron' => TTi18n::getText('Maintenance Jobs'), 'permission_control' => TTi18n::getText('Permission Groups'), 'permission_user' => TTi18n::getText('Permission Employees'), 'permission' => TTi18n::getText('Permissions'), 'policy_group' => TTi18n::getText('Policy Group'), 'policy_group_user' => TTi18n::getText('Policy Group Employees'), 'schedule_policy' => TTi18n::getText('Schedule Policy'), 'round_interval_policy' => TTi18n::getText('Rounding Policy'), 'meal_policy' => TTi18n::getText('Meal Policy'), 'break_policy' => TTi18n::getText('Break Policy'), 'accrual_policy' => TTi18n::getText('Accrual Policy'), 'accrual_policy_milestone' => TTi18n::getText('Accrual Policy Milestone'), 'over_time_policy' => TTi18n::getText('Overtime Policy'), 'premium_policy' => TTi18n::getText('Premium Policy'), 'premium_policy_branch' => TTi18n::getText('Premium Policy Branch'), 'premium_policy_department' => TTi18n::getText('Premium Policy Department'), 'premium_policy_job_group' => TTi18n::getText('Premium Policy Job Group'), 'premium_policy_job' => TTi18n::getText('Premium Policy Job'), 'premium_policy_job_item_group' => TTi18n::getText('Premium Policy Task Group'), 'premium_policy_job_item' => TTi18n::getText('Premium Policy Task'), 'absence_policy' => TTi18n::getText('Absense Policy'), 'exception_policy_control' => TTi18n::getText('Exception Policy (Control)'), 'exception_policy' => TTi18n::getText('Exception Policy'), 'holiday_policy' => TTi18n::getText('Holiday Policy'), 'holiday_policy_recurring_holiday' => TTi18n::getText('Holiday Policy'), 'pay_period' => TTi18n::getText('Pay Period'), 'pay_period_schedule' => TTi18n::getText('Pay Period Schedule'), 'pay_period_schedule_user' => TTi18n::getText('Pay Period Schedule Employees'), 'pay_period_time_sheet_verify' => TTi18n::getText('TimeSheet Verify'), 'pay_stub' => TTi18n::getText('Pay Stub'), 'pay_stub_amendment' => TTi18n::getText('Pay Stub Amendment'), 'pay_stub_entry_account' => TTi18n::getText('Pay Stub Account'), 'pay_stub_entry_account_link' => TTi18n::getText('Pay Stub Account Linking'), 'recurring_holiday' => TTi18n::getText('Recurring Holiday'), 'recurring_ps_amendment' => TTi18n::getText('Recurring PS Amendment'), 'recurring_ps_amendment_user' => TTi18n::getText('Recurring PS Amendment Employees'), 'recurring_schedule_control' => TTi18n::getText('Recurring Schedule'), 'recurring_schedule_user' => TTi18n::getText('Recurring Schedule Employees'), 'recurring_schedule_template_control' => TTi18n::getText('Recurring Schedule Template'), 'recurring_schedule_template' => TTi18n::getText('Recurring Schedule Week'), 'user_date_total' => TTi18n::getText('Employee Hours'), 'user_default' => TTi18n::getText('New Hire Defaults'), 'user_generic_data' => TTi18n::getText('Employee Generic Data'), 'user_preference' => TTi18n::getText('Employee Preference'), 'users' => TTi18n::getText('Employee'), 'user_identification' => TTi18n::getText('Employee Identification'), 'company_deduction' => TTi18n::getText('Tax / Deduction'), 'company_deduction_pay_stub_entry_account' => TTi18n::getText('Tax / Deduction PS Accounts'), 'user_deduction' => TTi18n::getText('Employee Deduction'), 'user_title' => TTi18n::getText('Employee Title'), 'user_wage' => TTi18n::getText('Employee Wage'), 'hierarchy_control' => TTi18n::getText('Hierarchy'), 'hierarchy_object_type' => TTi18n::getText('Hierarchy Object Type'), 'hierarchy_user' => TTi18n::getText('Hierarchy Subordinate'), 'hierarchy_level' => TTi18n::getText('Hierarchy Superior'), 'hierarchy' => TTi18n::getText('Hierarchy Tree'), 'user_report_data' => TTi18n::getText('Reports'), 'report_schedule' => TTi18n::getText('Report Schedule'), 'report_custom_column' => TTi18n::getText('Report Custom Column'), 'job' => TTi18n::getText('Job'), 'job_user_branch' => TTi18n::getText('Job Branch'), 'job_user_department' => TTi18n::getText('Job Department'), 'job_user_group' => TTi18n::getText('Job Group'), 'job_include_user' => TTi18n::getText('Job Include Employee'), 'job_exclude_user' => TTi18n::getText('Job Exclude Employee'), 'job_job_item_group' => TTi18n::getText('Job Task Group'), 'job_include_job_item' => TTi18n::getText('Job Include Task'), 'job_exclude_job_item' => TTi18n::getText('Job Exclude Task'), 'job_item' => TTi18n::getText('Job Task'), 'job_item_amendment' => TTi18n::getText('Job Task Amendment'), 'document' => TTi18n::getText('Document'), 'document_revision' => TTi18n::getText('Document Revision'), 'client' => TTi18n::getText('Client'), 'client_contact' => TTi18n::getText('Client Contact'), 'client_payment' => TTi18n::getText('Client Payment'), 'invoice' => TTi18n::getText('Invoice'), 'invoice_config' => TTi18n::getText('Invoice Settings'), 'invoice_transaction' => TTi18n::getText('Invoice Transaction'), 'product' => TTi18n::getText('Product'), 'product_price' => TTi18n::getText('Product Price Bracket'), 'product_tax_policy' => TTi18n::getText('Product Tax Policy'), 'tax_area_policy' => TTi18n::getText('Invoice Tax Area Policy'), 'tax_policy' => TTi18n::getText('Invoice Tax Policy'), 'transaction' => TTi18n::getText('Invoice Transaction'), 'user_contact' => TTi18n::getText('Employee Contact'), 'user_expense' => TTi18n::getText('Expense'), 'expense_policy' => TTi18n::getText('Expense Policy'), 'user_review' => TTi18n::getText('Review'), 'user_review_control' => TTi18n::getText('Review (Control)'), 'kpi' => TTi18n::getText('Key Performance Indicator'), 'qualification' => TTi18n::getText('Qualification'), 'user_skill' => TTi18n::getText('Skill'), 'user_education' => TTi18n::getText('Education'), 'user_membership' => TTi18n::getText('Memberships'), 'user_license' => TTi18n::getText('Licenses'), 'user_language' => TTi18n::getText('Languages'), 'job_vacancy' => TTi18n::getText('Job Vacancy'), 'job_applicant' => TTi18n::getText('Job Applicant'), 'job_application' => TTi18n::getText('Job Application'), 'job_applicant_location' => TTi18n::getText('Job Applicant Location'), 'job_applicant_employment' => TTi18n::getText('Job Applicant Employment'), 'job_applicant_reference' => TTi18n::getText('Job Applicant Reference'), 'job_applicant_skill' => TTi18n::getText('Job Applicant Skill'), 'job_applicant_education' => TTi18n::getText('Job Applicant Education'), 'job_applicant_license' => TTi18n::getText('Job Applicant Licenses'), 'job_applicant_language' => TTi18n::getText('Job Applicant Languages'), 'job_applicant_membership' => TTi18n::getText('Job Applicant Memberships'), 'ethnic_group' => TTi18n::getText('Ethnic Group'));
             break;
         case 'columns':
             $retval = array('-1010-first_name' => TTi18n::gettext('First Name'), '-1020-last_name' => TTi18n::gettext('Last Name'), '-1100-date' => TTi18n::gettext('Date'), '-1110-object' => TTi18n::gettext('Object'), '-1120-action' => TTi18n::gettext('Action'), '-1130-description' => TTi18n::gettext('Description'));
             break;
         case 'list_columns':
             $retval = Misc::arrayIntersectByKey($this->getOptions('default_display_columns'), Misc::trimSortPrefix($this->getOptions('columns')));
             break;
         case 'default_display_columns':
             //Columns that are displayed by default.
             $retval = array('first_name', 'last_name', 'date', 'object', 'action', 'description');
             break;
         case 'unique_columns':
             //Columns that are unique, and disabled for mass editing.
             $retval = array();
             break;
         case 'linked_columns':
             //Columns that are linked together, mainly for Mass Edit, if one changes, they all must.
             $retval = array();
             break;
     }
     return $retval;
 }
コード例 #29
0
 function _getFactoryOptions($name)
 {
     $retval = NULL;
     switch ($name) {
         case 'code':
             $retval = array('A' => TTi18n::gettext('(A) Shortage of Work'), 'B' => TTi18n::gettext('(B) Strike Or Lockout'), 'C' => TTi18n::gettext('(C) Return to School'), 'D' => TTi18n::gettext('(D) Illness or Injury'), 'E' => TTi18n::gettext('(E) Quit'), 'F' => TTi18n::gettext('(F) Maternity'), 'G' => TTi18n::gettext('(G) Retirement'), 'H' => TTi18n::gettext('(H) Work Sharing'), 'J' => TTi18n::gettext('(J) Apprentice Training'), 'M' => TTi18n::gettext('(M) Dismissal'), 'N' => TTi18n::gettext('(N) Leave of Absence'), 'P' => TTi18n::gettext('(P) Parental'), 'K' => TTi18n::gettext('(K) Other'));
             break;
         case 'columns':
             $retval = array('-1010-first_name' => TTi18n::gettext('First Name'), '-1020-last_name' => TTi18n::gettext('Last Name'), '-1025-insurable_absence_policies' => TTi18n::gettext('Insurable Absence Policies'), '-1030-insurable_earnings' => TTi18n::gettext('Insurable Earnings (Box 15B)'), '-1040-vacation_pay' => TTi18n::gettext('Vacation Pay (Box 17A)'), '-1050-code' => TTi18n::gettext('Reason'), '-1060-pay_period_type' => TTi18n::gettext('Pay Period Type'), '-1070-first_date' => TTi18n::gettext('First Day Worked'), '-1080-last_date' => TTi18n::gettext('Last Day For Which Paid'), '-1100-pay_period_end_date' => TTi18n::gettext('Final Pay Period Ending Date'), '-1120-recall_date' => TTi18n::gettext('Expected Date of Recall'), '-1150-serial' => TTi18n::gettext('Serial No'), '-1170-comments' => TTi18n::gettext('Comments'), '-1200-release_accruals' => TTi18n::gettext('Release All Accruals'), '-1220-generate_pay_stub' => TTi18n::gettext('Generate Final Pay Stub'), '-1230-insurable_hours' => TTi18n::gettext('Insurable Hours'), '-2000-created_by' => TTi18n::gettext('Created By'), '-2010-created_date' => TTi18n::gettext('Created Date'), '-2020-updated_by' => TTi18n::gettext('Updated By'), '-2030-updated_date' => TTi18n::gettext('Updated Date'));
             break;
         case 'list_columns':
             $retval = Misc::arrayIntersectByKey($this->getOptions('default_display_columns'), Misc::trimSortPrefix($this->getOptions('columns')));
             break;
         case 'default_display_columns':
             //Columns that are displayed by default.
             $retval = array('first_name', 'last_name', 'first_date', 'last_date', 'code');
             break;
         case 'unique_columns':
             //Columns that are unique, and disabled for mass editing.
             $retval = array();
             break;
         case 'linked_columns':
             //Columns that are linked together, mainly for Mass Edit, if one changes, they all must.
             $retval = array();
             break;
     }
     return $retval;
 }
コード例 #30
0
 function _getFactoryOptions($name)
 {
     $retval = NULL;
     switch ($name) {
         case 'status':
             $retval = array(10 => TTi18n::gettext('ENABLED'), 20 => TTi18n::gettext('DISABLED'));
             break;
         case 'type':
             $retval = array(10 => TTi18n::gettext('Spouse/Partner'), 20 => TTi18n::gettext('Parent/Guardian'), 30 => TTi18n::gettext('Sibling'), 40 => TTi18n::gettext('Child'), 50 => TTi18n::gettext('Relative'), 60 => TTi18n::gettext('Dependant'), 70 => TTi18n::gettext('Emergency Contact'));
             break;
         case 'sex':
             $retval = array(5 => TTi18n::gettext('Unspecified'), 10 => TTi18n::gettext('Male'), 20 => TTi18n::gettext('Female'));
             break;
         case 'columns':
             $retval = array('-1090-employee_first_name' => TTi18n::gettext('Employee First Name'), '-1110-employee_last_name' => TTi18n::gettext('Employee Last Name'), '-1010-title' => TTi18n::gettext('Employee Title'), '-1099-user_group' => TTi18n::gettext('Employee Group'), '-1100-default_branch' => TTi18n::gettext('Employee Branch'), '-1030-default_department' => TTi18n::gettext('Employee Department'), '-1060-first_name' => TTi18n::gettext('First Name'), '-1070-middle_name' => TTi18n::gettext('Middle Name'), '-1080-last_name' => TTi18n::gettext('Last Name'), '-1020-status' => TTi18n::gettext('Status'), '-1050-type' => TTi18n::getText('Type'), '-1120-sex' => TTi18n::gettext('Gender'), '-1125-ethnic_group' => TTi18n::gettext('Ethnic Group'), '-1130-address1' => TTi18n::gettext('Address 1'), '-1140-address2' => TTi18n::gettext('Address 2'), '-1150-city' => TTi18n::gettext('City'), '-1160-province' => TTi18n::gettext('Province/State'), '-1170-country' => TTi18n::gettext('Country'), '-1180-postal_code' => TTi18n::gettext('Postal Code'), '-1190-work_phone' => TTi18n::gettext('Work Phone'), '-1191-work_phone_ext' => TTi18n::gettext('Work Phone Ext'), '-1200-home_phone' => TTi18n::gettext('Home Phone'), '-1210-mobile_phone' => TTi18n::gettext('Mobile Phone'), '-1220-fax_phone' => TTi18n::gettext('Fax Phone'), '-1230-home_email' => TTi18n::gettext('Home Email'), '-1240-work_email' => TTi18n::gettext('Work Email'), '-1250-birth_date' => TTi18n::gettext('Birth Date'), '-1280-sin' => TTi18n::gettext('SIN/SSN'), '-1290-note' => TTi18n::gettext('Note'), '-1300-tag' => TTi18n::gettext('Tags'), '-2000-created_by' => TTi18n::gettext('Created By'), '-2010-created_date' => TTi18n::gettext('Created Date'), '-2020-updated_by' => TTi18n::gettext('Updated By'), '-2030-updated_date' => TTi18n::gettext('Updated Date'));
             break;
         case 'list_columns':
             $retval = Misc::arrayIntersectByKey($this->getOptions('default_display_columns'), Misc::trimSortPrefix($this->getOptions('columns')));
             break;
         case 'default_display_columns':
             //Columns that are displayed by default.
             $retval = array('employee_first_name', 'employee_last_name', 'title', 'user_group', 'default_branch', 'default_department', 'type', 'first_name', 'last_name', 'home_phone');
             break;
         case 'unique_columns':
             //Columns that are unique, and disabled for mass editing.
             $retval = array('sin');
             break;
         case 'linked_columns':
             //Columns that are linked together, mainly for Mass Edit, if one changes, they all must.
             $retval = array('country', 'province', 'postal_code');
             break;
     }
     return $retval;
 }