Commit 7128c223 by Jansa Jose

booking summary

parent 40dc84ea
......@@ -534,7 +534,7 @@
/*********************************************************************************/
/************************************Mobile API's*********************************/
//Mobile Number Availability
public function mobile_number_availability(){
header('Content-type: application/json');
......@@ -555,6 +555,7 @@
echo json_encode($respArr);exit;
}
//User Login
public function user_login(){
header('Content-type: application/json');
......@@ -658,6 +659,7 @@
echo json_encode($respArr); exit;
}
//Get Booked Services
public function get_booked_services(){
header('Content-type: application/json');
$headers = apache_request_headers();
......@@ -677,6 +679,7 @@
echo json_encode($bookData);exit;
}
//Add Vehicle Details
public function add_vehicle_details(){
header('Content-type: application/json');
$headers = apache_request_headers();
......@@ -747,6 +750,7 @@
echo json_encode($respData);exit;
}
//Get Services
public function get_services(){
header('Content-type: application/json');
$headers = apache_request_headers();
......@@ -823,6 +827,7 @@
echo json_encode($respArr);exit;
}
//Get Vehicle Details
public function get_vehicle_details(){
header('Content-type: application/json');
$headers = apache_request_headers();
......@@ -872,6 +877,7 @@
echo json_encode($respArr);exit;
}
//Search Sub Services
public function search_sub_services(){
header('Content-type: application/json');
$headers = apache_request_headers();
......@@ -952,6 +958,7 @@
echo json_encode($respArr);exit;
}
//Book Service
public function book_service(){
header('Content-type: application/json');
$headers = apache_request_headers();
......@@ -1009,6 +1016,7 @@
}
//Get Booking Summary
public function get_booking_summary(){
header('Content-type: application/json');
$headers = apache_request_headers();
......@@ -1031,6 +1039,7 @@
echo json_encode($res);exit;
}
//Get Mechanics
public function get_mechanics(){
header('Content-type: application/json');
$headers = apache_request_headers();
......@@ -1127,6 +1136,7 @@
echo json_encode($respArr);exit;
}
//Add Service Details
public function add_service_details(){
header('Content-type: application/json');
$headers = apache_request_headers();
......@@ -1208,6 +1218,7 @@
echo json_encode($addServiceDetails);exit();
}
//Remove Booking
public function remove_booking(){
header('Content-type:application/json');
$headers = apache_request_headers();
......@@ -1229,6 +1240,7 @@
echo json_encode($removed);
}
//Get Service
public function get_service(){
header('Content-type:application/json');
$headers = apache_request_headers();
......
......@@ -308,6 +308,7 @@ class Webservice_model extends CI_Model {
unset($mechanic_data['vehicle_data']);
$mechanic_data['services'] = json_decode($mechanic_data['issues_selected']);
if(!empty($mechanic_data['services'])){
foreach($mechanic_data['services'] as $key => $value){
$sql = "SELECT IC.*, MI.custom_description, MI.custom_service_fee
FROM issues_category AS IC
......@@ -315,7 +316,7 @@ class Webservice_model extends CI_Model {
MI.mechanic_id='".$mechanic_data['mechanic_id']."' AND MI.status='1')
WHERE IC.status='1' AND IC.issue_cat_id='".$value->sub_issue_id."'";
$issue_data = $this->db->query($sql)->row();
if(empty($issue_data)){
if(!empty($issue_data)){
if($issue_data->custom_description != '' && $issue_data->custom_service_fee != ''){
$mechanic_data['services'][$key]->description = $issue_data->custom_description;
$mechanic_data['services'][$key]->service_fee = $issue_data->custom_service_fee;
......@@ -325,6 +326,9 @@ class Webservice_model extends CI_Model {
}
}
}
}else{
$mechanic_data['services'] = [];
}
unset($mechanic_data['issues_selected']);
......
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