Commit fe05ca60 by Jansa Jose

Merge branch 'master' into 'local_production'

get allocated service api changes See merge request !109
parents da2b9918 94eb04d5
...@@ -161,17 +161,11 @@ class Webservice_model extends CI_Model { ...@@ -161,17 +161,11 @@ class Webservice_model extends CI_Model {
return $respArr; return $respArr;
} }
$where = ($type == 1)?array('bookings.booking_id'=>$id):array('bookings.customer_id'=>$id); $where = ($type == 1)?array('bookings.booking_id'=>$id):array('bookings.customer_id'=>$id);
$bookDetails = '';
//if($type == 1){
// $bookDetails = ",mechanic.location,mechanic.location_lat,mechanic.location_lng";
//}
$this->db->select("bookings.booking_id as id,bookings.scheduled_date as booked_date,bookings.scheduled_time as time,customer_vehicle.vehicle_data,customer_vehicle.customer_veh_id as vehicle_id,customer_vehicle.car_model_year as year,customer_vehicle.car_maker as vehcle_make,customer_vehicle.car_model as vehicle_type,bookings.mileage, $this->db->select("bookings.booking_id as id,bookings.scheduled_date as booked_date,bookings.scheduled_time as time,customer_vehicle.vehicle_data,customer_vehicle.customer_veh_id as vehicle_id,customer_vehicle.car_model_year as year,customer_vehicle.car_maker as vehcle_make,customer_vehicle.car_model as vehicle_type,bookings.mileage,
bookings.service_type as is_emergency,bookings.status as service_status,bookings.issues_selected,bookings.custom_issue_data,mechanic.location,mechanic.location_lat,mechanic.location_lng,mechanic_booking.amount,TRIM(concat(mechanic.first_name,' ',IFNULL(mechanic.last_name,''))) as mechanic_name,mechanic.address,mechanic.phone"); bookings.service_type as is_emergency,bookings.status as service_status,bookings.issues_selected,bookings.custom_issue_data,mechanic.location,mechanic.location_lat,mechanic.location_lng,mechanic_booking.amount,TRIM(concat(mechanic.first_name,' ',IFNULL(mechanic.last_name,''))) as mechanic_name,mechanic.address,mechanic.phone");
$this->db->join('customer_vehicle','customer_vehicle.customer_veh_id = bookings.customer_veh_id'); $this->db->join('customer_vehicle','customer_vehicle.customer_veh_id = bookings.customer_veh_id');
//if($type == 1){ $this->db->join("mechanic_booking","mechanic_booking.booking_id = bookings.booking_id AND mechanic_booking.status='1'");
$this->db->join("mechanic_booking","mechanic_booking.booking_id = bookings.booking_id AND mechanic_booking.status='1'"); $this->db->join("mechanic","mechanic_booking.mechanic_id = mechanic.mechanic_id");
$this->db->join("mechanic","mechanic_booking.mechanic_id = mechanic.mechanic_id");
//}
$this->db->where('scheduled_date >',date('Y-m-d h:i')); $this->db->where('scheduled_date >',date('Y-m-d h:i'));
if($start != 0 || $per_page != 0){ if($start != 0 || $per_page != 0){
$this->db->limit($per_page,$start); $this->db->limit($per_page,$start);
......
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