Commit f5f25e04 by Jansa Jose

todays service

parent 437dd89c
...@@ -86,7 +86,7 @@ public function getBookedService($postData = array(),$start = '',$per_page = '', ...@@ -86,7 +86,7 @@ public function getBookedService($postData = array(),$start = '',$per_page = '',
// $where['BUK.scheduled_date'] = date("Y-m-d", strtotime('tomorrow')); // $where['BUK.scheduled_date'] = date("Y-m-d", strtotime('tomorrow'));
// } // }
$this->db->select("BUK.scheduled_date as date,BUK.scheduled_time as time,BUK.booking_id as service_id,BUK.status,CSTVEH.car_name,BUK.mileage,BUK.issues_selected,BUK.custom_issue_data,BUK.service_type as type,MCHBUK.amount as total_amount,TRIM(CONCAT(CUST.first_name,' ' ,IFNULL(CUST.last_name,''))) as customer_name,CUST.phone as phone_number,CSTVEH.vehicle_data,CSTVEH.car_loc_lat as cust_lat,CSTVEH.car_loc_lng as cust_lng,CSTVEH.car_location as cust_address"); $this->db->select("BUK.scheduled_date as date,BUK.scheduled_time as time,BUK.booking_id as service_id,BUK.status,CSTVEH.car_name,BUK.mileage,BUK.issues_selected,BUK.custom_issue_data,BUK.service_type as type,MCHBUK.amount,BUK.cost,TRIM(CONCAT(CUST.first_name,' ' ,IFNULL(CUST.last_name,''))) as customer_name,CUST.phone as phone_number,CSTVEH.vehicle_data,CSTVEH.car_loc_lat as cust_lat,CSTVEH.car_loc_lng as cust_lng,CSTVEH.car_location as cust_address");
$this->db->from('bookings as BUK'); $this->db->from('bookings as BUK');
$this->db->join('customers as CUST','CUST.customer_id = BUK.customer_id'); $this->db->join('customers as CUST','CUST.customer_id = BUK.customer_id');
$this->db->join('customer_vehicle as CSTVEH','CSTVEH.customer_veh_id = BUK.customer_veh_id'); $this->db->join('customer_vehicle as CSTVEH','CSTVEH.customer_veh_id = BUK.customer_veh_id');
...@@ -110,7 +110,8 @@ public function getBookedService($postData = array(),$start = '',$per_page = '', ...@@ -110,7 +110,8 @@ public function getBookedService($postData = array(),$start = '',$per_page = '',
$bookData[$key]['service_image'] = (isset($custom_issue_data->optionalImages))?$custom_issue_data->optionalImages:[]; $bookData[$key]['service_image'] = (isset($custom_issue_data->optionalImages))?$custom_issue_data->optionalImages:[];
$bookData[$key]['service_message'] = (isset($custom_issue_data->optionlaDescription))?$custom_issue_data->optionlaDescription:''; $bookData[$key]['service_message'] = (isset($custom_issue_data->optionlaDescription))?$custom_issue_data->optionlaDescription:'';
unset($bookData[$key]['issues_selected'],$bookData[$key]['custom_issue_data']); $bookData[$key]['total_amount'] = ($value['type'] == '1')?$value['amount']:$value['cost'];
unset($bookData[$key]['issues_selected'],$bookData[$key]['custom_issue_data'],$bookData[$key]['amount'],$bookData[$key]['cost']);
if(!empty($issues_selected)){ if(!empty($issues_selected)){
$new = array(); $new = array();
foreach ($issues_selected as $issue_key => $issue_value) { foreach ($issues_selected as $issue_key => $issue_value) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment