} //print_r($date_total_rows); /* Get Branch/Department Totals */ $job_options = array(); $job_item_options = array(); if ($current_company->getProductEdition() == 20) { $jlf = new JobListFactory(); $job_options = $jlf->getByCompanyIdArray($current_company->getId(), FALSE); $jilf = new JobItemListFactory(); $job_item_options = $jilf->getByCompanyIdArray($current_company->getId(), FALSE); } $udtlf = new UserDateTotalListFactory(); //Get only worked/paid absence totals. $udtlf->getPaidTimeByCompanyIDAndUserIdAndStatusAndStartDateAndEndDate($current_company->getId(), $user_id, array(10, 30), $start_date, $end_date); if ($udtlf->getRecordCount() > 0) { foreach ($udtlf as $udt_obj) { $user_date_stamp = TTDate::strtotime($udt_obj->getColumn('user_date_stamp')); if ($udt_obj->getBranch() != 0 and isset($branch_options[$udt_obj->getBranch()])) { $branch = $branch_options[$udt_obj->getBranch()]; } else { $branch = TTi18n::gettext('No Branch'); } if ($udt_obj->getDepartment() != 0 and isset($department_options[$udt_obj->getDepartment()])) { $department = $department_options[$udt_obj->getDepartment()]; } else { $department = TTi18n::gettext('No Department'); } if ($udt_obj->getJob() != FALSE and isset($job_options[$udt_obj->getJob()])) { $job = $job_options[$udt_obj->getJob()];