예제 #1
0
 public function getMarketOffice()
 {
     $market_ofc = array();
     $market_office = MarketOffice::select('id', 'office_name')->get();
     if (!$market_office->isEmpty()) {
         foreach ($market_office as $key => $each) {
             $market_ofc[$each->id] = array('id' => $each->id, 'office_name' => $each->office_name, "driver_cnt" => $this->getMrktOfcDriverCount($each->id));
             $market_ofc_ids[] = $each->id;
         }
     }
     return array("market_ofc" => $market_ofc, "market_ofc_ids" => $market_ofc_ids);
 }
예제 #2
0
 protected function getOfficeDropDown()
 {
     $data = array();
     $market_ofc = array();
     $market_office = MarketOffice::select('id', 'office_name')->get();
     if (!$market_office->isEmpty()) {
         foreach ($market_office as $key => $each) {
             $market_ofc[$key]['id'] = $each->id;
             $market_ofc[$key]['office_name'] = $each->office_name;
         }
     }
     $data['city_ofc'] = $market_ofc;
     $data['selected_cityofc'] = '';
     if (Session::get('admin_market_ofc') && Session::get('admin_market_ofc') != "") {
         $data['selected_cityofc'] = Session::get('admin_market_ofc');
     }
     return $data;
 }
예제 #3
0
 public function getMarketOfficeData($market_office_id)
 {
     $mrkt_office_data = MarketOffice::select()->where('id', '=', $market_office_id)->get();
     $result = array();
     if (!$mrkt_office_data->isEmpty()) {
         foreach ($mrkt_office_data as $val) {
             $result['id'] = $val->id;
             $result['office_name'] = $val->office_name;
             $result['location'] = $val->location;
             $result['timezone'] = $val->timezone;
             $result['tax_percentage'] = $val->tax_percentage;
         }
     }
     return $result;
 }