$ugdlf = new UserGenericDataListFactory(); $ugdf = new UserGenericDataFactory(); $action = Misc::findSubmitButton(); switch ($action) { case 'export': case 'display_report': //Debug::setVerbosity(11); Debug::Text('Submit! Action: ' . $action, __FILE__, __LINE__, __METHOD__, 10); //Debug::Arr($filter_data, 'aFilter Data', __FILE__, __LINE__, __METHOD__,10); $ulf = new UserListFactory(); $ulf->getSearchByCompanyIdAndArrayCriteria($current_company->getId(), $filter_data); if ($ulf->getRecordCount() > 0) { //Get total gross pay stub account IDs $cdf = new CompanyDeductionFactory(); $cdf->setCompany($current_company->getId()); $total_gross_psea_ids = $cdf->getExpandedPayStubEntryAccountIDs($cdf->getPayStubEntryAccountLinkObject()->getTotalGross()); //var_dump($total_gross_psea_ids); //Get include/exclude IDs for company deduction. $cdlf = new CompanyDeductionListFactory(); $cdlf->getByCompanyIdAndId($current_company->getId(), $filter_data['company_deduction_ids']); if ($cdlf->getRecordCount() > 0) { $taxable_wages_psea_ids = array(); $tax_withheld_psea_ids = array(); Debug::Text('Found Company Deductions...', __FILE__, __LINE__, __METHOD__, 10); foreach ($cdlf as $cd_obj) { $taxable_wages_psea_ids = array_merge($taxable_wages_psea_ids, (array) $cd_obj->getCombinedIncludeExcludePayStubEntryAccount($cd_obj->getIncludePayStubEntryAccount(), $cd_obj->getExcludePayStubEntryAccount())); $tax_withheld_psea_ids[] = $cd_obj->getPayStubEntryAccount(); } $taxable_wages_psea_ids = array_unique($taxable_wages_psea_ids); $tax_withheld_psea_ids = array_unique($tax_withheld_psea_ids); }