Пример #1
0
 public function get_checkinoutreport()
 {
     $date = Input::get('date', date('Y-m-d'));
     $checkout = Checkout::left_join('checkins as cin', function ($join) {
         $join->on('checkouts.kso_id', '=', 'cin.kso_id');
         $join->on('checkouts.operasi_time', '=', 'cin.operasi_time');
     })->where('checkouts.operasi_time', '=', $date)->where('checkouts.pool_id', '=', Auth::user()->pool_id)->order_by('checkouts.printspj_time', 'asc')->get(array('cin.id as checkin_id', 'checkouts.id as checkout_id', 'checkouts.fleet_id', 'checkouts.driver_id', 'checkouts.printspj_time', 'checkouts.checkout_time', 'checkouts.shift_id', 'checkouts.operasi_status_id', 'cin.checkin_time', 'checkouts.print_out_time', 'checkouts.otorisasi_user_id', 'checkouts.keterangan'));
     $this->data['date'] = $date;
     $this->data['checkout'] = $checkout;
     return View::make('themes.modul.' . $this->views . '.checkinoutreport', $this->data);
 }