Example #1
0
// See index.php
/*
 * Get FORM variables
 */
extract(FormVariables::GetVariables(array('action', 'setup_data', 'generic_data', 'filter_data')));
URLBuilder::setURL($_SERVER['SCRIPT_NAME'], array('filter_data' => $filter_data));
$pseallf = new PayStubEntryAccountLinkListFactory();
$pseallf->getByCompanyId($current_company->getId());
if ($pseallf->getRecordCount() > 0) {
    $pseal_obj = $pseallf->getCurrent();
}
$cf = new CompanyFactory();
$state_options = $cf->getOptions('province', 'US');
$column_ps_entry_name_map = array('p1_1' => @$setup_data['p1_1_psea_ids'], 'p1_2' => @$setup_data['p1_2_psea_ids']);
$pplf = new PayPeriodListFactory();
$year_options = $pplf->getYearsArrayByCompanyId($current_company->getId());
$quarter_dates = array(1 => array('start' => mktime(0, 0, 0, 1, 1, $filter_data['year']), 'end' => mktime(0, 0, -1, 4, 1, $filter_data['year'])), 2 => array('start' => mktime(0, 0, 0, 4, 1, $filter_data['year']), 'end' => mktime(0, 0, -1, 7, 1, $filter_data['year'])), 3 => array('start' => mktime(0, 0, 0, 7, 1, $filter_data['year']), 'end' => mktime(0, 0, -1, 10, 1, $filter_data['year'])), 4 => array('start' => mktime(0, 0, 0, 10, 1, $filter_data['year']), 'end' => mktime(0, 0, -1, 13, 1, $filter_data['year'])));
$filter_data = Misc::preSetArrayValues($filter_data, array('include_user_ids', 'exclude_user_ids', 'user_status_ids', 'group_ids', 'branch_ids', 'department_ids', 'user_title_ids', 'pay_period_ids', 'column_ids'), array());
$ugdlf = new UserGenericDataListFactory();
$ugdf = new UserGenericDataFactory();
$action = Misc::findSubmitButton();
Debug::Text('Action: ' . $action, __FILE__, __LINE__, __METHOD__, 10);
switch ($action) {
    case 'print_form':
    case 'display_form':
    case 'display_report':
        //Debug::setVerbosity(11);
        if ($action == 'print_form') {
            $show_background = FALSE;
        } else {
            $show_background = TRUE;