Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private function addRowToOutput($day, $cashier_log_row, $work_hours_one_row)
- {
- $row_data = [
- 'day' => $day,
- 'normal_work_hours' => $work_hours_one_row[0]->normal_work_hours,
- 'night_work_hours' => $work_hours_one_row[0]->night_work_hours,
- 'holiday_work_hours' => $work_hours_one_row[0]->holiday_work_hours
- ];
- if ($this->for_sell_point_report || $this->for_month_time_card) {
- $row_data['last_name'] = $cashier_log_row->last_name;
- $row_data['first_name'] = $cashier_log_row->first_name;
- // id will be needed to group by cashier
- $row_data['id'] = $cashier_log_row->id;
- // needed for month time card. For sell point report not needed
- $row_data['is_weekend'] = $this->isWeekend($day);
- // $cashier_log_row->id is cashier id. This say we have day and cashier id unique keys, for easier search
- // later if exists row with day and cashier combination
- $this->output_rows[$day . $cashier_log_row->id] = $row_data;
- }
- else {
- // for cashier report
- $row_data['shops'] = [$cashier_log_row->address];
- $this->output_rows[$day] = $row_data;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment