Guest User

Untitled

a guest
Sep 16th, 2015
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.28 KB | None | 0 0
  1. private function addRowToOutput($day, $cashier_log_row, $work_hours_one_row)
  2.     {
  3.         $row_data = [
  4.             'day' => $day,
  5.             'normal_work_hours' => $work_hours_one_row[0]->normal_work_hours,
  6.             'night_work_hours' => $work_hours_one_row[0]->night_work_hours,
  7.             'holiday_work_hours' => $work_hours_one_row[0]->holiday_work_hours
  8.         ];
  9.  
  10.         if ($this->for_sell_point_report || $this->for_month_time_card) {
  11.  
  12.             $row_data['last_name'] = $cashier_log_row->last_name;
  13.             $row_data['first_name'] = $cashier_log_row->first_name;
  14.             // id will be needed to group by cashier
  15.             $row_data['id'] = $cashier_log_row->id;
  16.             // needed for month time card. For sell point report not needed
  17.             $row_data['is_weekend'] = $this->isWeekend($day);
  18.  
  19.             // $cashier_log_row->id is cashier id. This say we have day and cashier id unique keys, for easier search
  20.             // later if exists row with day and cashier combination
  21.             $this->output_rows[$day . $cashier_log_row->id] = $row_data;
  22.         }
  23.         else {
  24.             // for cashier report
  25.  
  26.             $row_data['shops'] = [$cashier_log_row->address];
  27.  
  28.             $this->output_rows[$day] = $row_data;
  29.         }
  30.     }
Advertisement
Add Comment
Please, Sign In to add comment