Example #1
0
 public function get_get_senior_report($center = null)
 {
     if ($center == "ALL") {
         $center = null;
     }
     $startDate = null;
     $endDate = null;
     $month = $this->param('month');
     if (!is_null($month)) {
         $monthSplit = explode('-', $month);
         $startDate = date("Y-m-d", mktime(0, 0, 0, (int) $monthSplit[0], 1, (int) $monthSplit[1]));
         $endDate = date("Y-m-d", mktime(0, 0, 0, (int) $monthSplit[0] + 1, 1, (int) $monthSplit[1]));
     }
     $reportArray = Controller_Reports::generate_senior_report($center, $startDate, $endDate);
     return $this->response(array('titles' => array('Name', 'Hotkeys', 'Pack Out', 'Pack In', 'Paid', 'HK to PO', 'PO to PI', 'PI to PC', 'PO to PC', 'HK to PC', 'Revenue', '£ per HK'), 'report' => is_null($reportArray) ? array() : $reportArray));
 }