Exemplo n.º 1
0
 public function get_add()
 {
     $this->data['pools'] = Koki::to_dropdown(Pool::all(), 'id', 'pool_name', array(0 => 'All'));
     $this->data['users'] = Koki::to_dropdown(User::all(), 'id', 'first_name');
     $this->data['create'] = true;
     return View::make('themes.modul.' . $this->views . '.form', $this->data);
 }
Exemplo n.º 2
0
 public function get_rekapsetoran()
 {
     $shifts = Shift::all();
     $pool_id = Auth::user()->pool_id;
     $shiftoption = Koki::to_dropdown($shifts, 'id', 'shift');
     $this->data['shifts'] = $shiftoption + array('all' => 'Gabungan');
     $this->data['fleets'] = Kso::join('fleets', 'fleets.id', '=', 'ksos.fleet_id')->where('ksos.pool_id', '=', $pool_id)->where('ksos.actived', '=', 1)->get(array('ksos.id', 'ksos.fleet_id', 'fleets.taxi_number'));
     return View::make('themes.modul.' . $this->views . '.rekapsetoranarmada', $this->data);
 }
Exemplo n.º 3
0
 public function get_reportdaily($date = false)
 {
     Log::write('info', Request::ip() . ' User : '******' Event: Read report', true);
     if (!$date) {
         $date = date('Y-m-d');
     }
     $timestamp = strtotime($date);
     $shifts = Shift::all();
     $this->data['shifts'] = Koki::to_dropdown($shifts, 'id', 'shift');
     $this->data['report_daily'] = DB::table('financial_report_daily')->where_pool_id(Auth::user()->pool_id)->get();
     //return json_encode($report_daily);
     return View::make('themes.modul.' . $this->report . '.dailyreport', $this->data);
 }
Exemplo n.º 4
0
 public function get_reportmonthly($date = false)
 {
     Log::write('info', Request::ip() . ' User : '******' Event: Read report Kas', true);
     if (!$date) {
         $date = date('Y-m-d');
     }
     $timestamp = strtotime($date);
     $shifts = Shift::all();
     $shiftoption = Koki::to_dropdown($shifts, 'id', 'shift');
     $this->data['shifts'] = $shiftoption + array('all' => 'Gabungan');
     return View::make('themes.modul.' . $this->report . '.monthreport', $this->data);
 }
Exemplo n.º 5
0
 public function get_ps()
 {
     $this->data['create'] = true;
     $this->data['suppliers'] = Koki::to_dropdown(Supplier::all(), 'id', 'company_name');
     //var_dump($this->data['suppliers'] );
     return View::make('themes.modul.' . $this->views . '.penerimaansp-jquery', $this->data);
 }
Exemplo n.º 6
0
 public function get_detail($id = false, $id_group = false)
 {
     if (!$id || !$id_group) {
         return false;
     }
     $group = Schedulegroup::find($id_group);
     $interval = Schedulemaster::find($group->schedule_master_id);
     $dayofmonth = array();
     $optionsmonth = array();
     $optionsyears = array();
     for ($i = 1; $i <= $interval->bravo_interval + 1; $i++) {
         $dayofmonth[$i] = $i;
     }
     for ($month = 1; $month <= 12; $month++) {
         $optionsmonth[$month] = Myfungsi::bulan($month);
     }
     for ($year = date('Y'); $year < date('Y') + 3; $year++) {
         $optionsyears[$year] = $year;
     }
     $this->data['fleets'] = Schedulefleetgroup::where('schedule_group_id', '=', $id_group)->get();
     $this->data['group'] = Schedulegroup::find($id_group);
     $this->data['dayofmonth'] = $dayofmonth;
     $this->data['months'] = $optionsmonth;
     $this->data['years'] = $optionsyears;
     $this->data['shifts'] = Koki::to_dropdown(Shift::all(), 'id', 'shift');
     $this->data['fleetinfo'] = Fleet::join('ksos', 'fleets.id', '=', 'ksos.fleet_id')->where('ksos.fleet_id', '=', $id)->where('ksos.actived', '=', 1)->where('fleets.pool_id', '=', Auth::user()->pool_id)->first();
     //->get(array('fleets.*','ksos.bravo_driver_id', 'ksos.charlie_driver_id'));
     return View::make('themes.modul.' . $this->views . '.setholiday', $this->data);
 }
Exemplo n.º 7
0
 public function get_qzspj()
 {
     $shifts = Shift::all();
     $this->data['shifts'] = Koki::to_dropdown($shifts, 'id', 'shift');
     return View::make('themes.modul.' . $this->views . '.qzcheckouts', $this->data);
 }