Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dcarfixers
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tobin
dcarfixers
Commits
7128c223
Commit
7128c223
authored
Feb 12, 2019
by
Jansa Jose
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
booking summary
parent
40dc84ea
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
Webservices.php
application/controllers/Webservices.php
+13
-1
Webservice_model.php
application/models/Webservice_model.php
+5
-1
No files found.
application/controllers/Webservices.php
View file @
7128c223
...
...
@@ -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
();
...
...
application/models/Webservice_model.php
View file @
7128c223
...
...
@@ -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'
]);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment