function getUserDateTotalArray($start_date, $end_date)
 {
     $udtlf = new UserDateTotalListFactory();
     $date_totals = array();
     //Get only system totals.
     $udtlf->getByCompanyIDAndUserIdAndStatusAndStartDateAndEndDate($this->company_id, $this->user_id, 10, $start_date, $end_date);
     if ($udtlf->getRecordCount() > 0) {
         foreach ($udtlf as $udt_obj) {
             $user_date_stamp = TTDate::strtotime($udt_obj->getColumn('user_date_stamp'));
             $type_and_policy_id = $udt_obj->getType() . (int) $udt_obj->getOverTimePolicyID();
             $date_totals[$user_date_stamp][] = array('date_stamp' => $udt_obj->getColumn('user_date_stamp'), 'id' => $udt_obj->getId(), 'user_date_id' => $udt_obj->getUserDateId(), 'status_id' => $udt_obj->getStatus(), 'type_id' => $udt_obj->getType(), 'over_time_policy_id' => $udt_obj->getOverTimePolicyID(), 'type_and_policy_id' => $type_and_policy_id, 'branch_id' => (int) $udt_obj->getBranch(), 'department_id' => $udt_obj->getDepartment(), 'total_time' => $udt_obj->getTotalTime(), 'name' => $udt_obj->getName(), 'tmp_override' => $udt_obj->getOverride());
         }
     }
     return $date_totals;
 }
             $date_premium_total_group[$user_date_stamp][$date_data['premium_policy_id']] = $date_data;
         }
     }
     $date_total_premium_ids = array_unique($date_total_premium_ids);
     sort($date_total_premium_ids);
     $date_premium_total_rows = TimeSheetFormatArrayByDate($date_premium_total_group, $date_total_premium_ids, $calendar_array, 'premium_policy');
     //var_dump($date_premium_total_rows);
 }
 /*
 	Get absences
 */
 $aplf = new AbsencePolicyListFactory();
 $absence_policy_options = $aplf->getByCompanyIdArray($current_company->getId());
 $udtlf = new UserDateTotalListFactory();
 //Get only worked totals.
 $udtlf->getByCompanyIDAndUserIdAndStatusAndStartDateAndEndDate($current_company->getId(), $user_id, 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->getAbsencePolicyID() !== FALSE) {
             $absence_policy = $absence_policy_options[$udt_obj->getAbsencePolicyID()];
         } else {
             $absence_policy = TTi18n::gettext('No Policy');
         }
         /*
         				if ( $udt_obj->getBranch() !== FALSE ) {
         					$branch = $branch_options[$udt_obj->getBranch()];
         				} else {
         					$branch = 'No Branch';
         				}
         */