foreach ($tmp_filter_pay_period_ids as $key => $filter_pay_period_id) { $filter_data['pay_period_ids'][] = Misc::trimSortPrefix($filter_pay_period_id); } unset($key, $tmp_filter_pay_period_ids, $filter_pay_period_id); //if ( isset($filter_data['pay_period_ids']) AND isset($filter_data['user_ids']) ) { if (isset($filter_data['pay_period_ids'])) { //Get column headers $psealf->getByCompanyId($current_company->getId()); foreach ($psealf as $psea_obj) { //$report_columns[$psen_obj->getId()] = $psen_obj->getDescription(); $report_columns[$psea_obj->getId()] = $psea_obj->getName(); } //var_dump($report_columns); $report_columns = Misc::prependArray($static_columns, $report_columns); $psealf = new PayStubEntryAccountListFactory(); $psealf->getByCompanyId($current_company->getId()); if ($psealf->getRecordCount() > 0) { foreach ($psealf as $psea_obj) { $psea_arr[$psea_obj->getId()] = array('name' => $psea_obj->getName(), 'debit_account' => $psea_obj->getDebitAccount(), 'credit_account' => $psea_obj->getCreditAccount()); } } //var_dump($psea_arr); //Get all pay stubs. $pslf = new PayStubListFactory(); //$pslf->getByUserIdAndCompanyIdAndPayPeriodId( $filter_data['user_ids'], $current_company->getId(), $filter_data['pay_period_ids'] ); $pslf->getSearchByCompanyIdAndArrayCriteria($current_company->getId(), $filter_data); if ($pslf->getRecordCount() > 0) { $ulf = new UserListFactory(); $blf = new BranchListFactory(); $branch_options = $blf->getByCompanyIdArray($current_company->getId()); //Get Branch ID to Branch Code mapping
function getPayStubEntryAccountsArray() { if (is_array($this->pay_stub_entry_accounts_obj)) { //Debug::text('Returning Cached data...' , __FILE__, __LINE__, __METHOD__,10); return $this->pay_stub_entry_accounts_obj; } else { $psealf = new PayStubEntryAccountListFactory(); $psealf->getByCompanyId($this->getUserObject()->getCompany()); if ($psealf->getRecordCount() > 0) { foreach ($psealf as $psea_obj) { $this->pay_stub_entry_accounts_obj[$psea_obj->getId()] = array('type_id' => $psea_obj->getType(), 'accrual_pay_stub_entry_account_id' => $psea_obj->getAccrual()); } //Debug::Arr($this->pay_stub_entry_accounts_obj, ' Pay Stub Entry Accounts ('.count($this->pay_stub_entry_accounts_obj).'): ' , __FILE__, __LINE__, __METHOD__,10); return $this->pay_stub_entry_accounts_obj; } Debug::text('Returning FALSE...', __FILE__, __LINE__, __METHOD__, 10); return FALSE; } }