Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
IPok_Web
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
IPok
IPok_Web
Commits
71f1ebd9
Commit
71f1ebd9
authored
Jul 27, 2018
by
Jansa Jose
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
payment change
parent
797bfa45
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
16 deletions
+22
-16
Webservice.php
admin/application/controllers/Webservice.php
+0
-0
Webservice_model.php
admin/application/models/Webservice_model.php
+22
-16
No files found.
admin/application/controllers/Webservice.php
View file @
71f1ebd9
This diff is collapsed.
Click to expand it.
admin/application/models/Webservice_model.php
View file @
71f1ebd9
...
...
@@ -3865,22 +3865,28 @@ class Webservice_model extends CI_Model {
$this
->
db
->
update
(
'tbl_booking'
,
$update
);
}
// public function get_booked_payed_data($id){
// $booked_data = $this->db->get_where('tbl_booking',array('id'=>$id))->row_array();
// if($booked_data){
// $check = $this->db->get_where('tbl_booking',array('doctor_id'=>$booked_data['doctor_id'],'clinic_id'=>$booked_data['clinic_id'],'date'=>$booked_data['date'],'time'=>$booked_data['time'],'payment_status'=>'1'));
// if($check->num_rows() <= '0'){
// $is_result = 0;
// }else if($check->num_rows() == '1'){
// $is_result = 1;
// }else if($check->num_rows() >= '1'){
// $is_result = 2;
// }
// return $is_result;
// }
// }
public
function
get_booked_payed_data
(
$id
){
$booked_data
=
$this
->
db
->
get_where
(
'tbl_booking'
,
array
(
'id'
=>
$id
))
->
row_array
();
if
(
$booked_data
){
$check
=
$this
->
db
->
get_where
(
'tbl_booking'
,
array
(
'doctor_id'
=>
$booked_data
[
'doctor_id'
],
'clinic_id'
=>
$booked_data
[
'clinic_id'
],
'date'
=>
$booked_data
[
'date'
],
'time'
=>
$booked_data
[
'time'
],
'payment_status'
=>
'1'
));
if
(
$check
->
num_rows
()
<=
'0'
){
$is_result
=
0
;
$res
=
array
(
'status'
=>
'success'
,
'is_result'
=>
$is_result
);
}
else
if
(
$check
->
num_rows
()
==
'1'
){
$is_result
=
1
;
$this
->
db
->
update
(
'tbl_booking'
,
array
(
'booking_status'
=>
'0'
),
array
(
'id'
=>
$id
));
$res
=
array
(
'status'
=>
'success'
,
'is_result'
=>
$is_result
);
}
else
if
(
$check
->
num_rows
()
>=
'1'
){
$is_result
=
2
;
$this
->
db
->
update
(
'tbl_booking'
,
array
(
'booking_status'
=>
'4'
),
array
(
'id'
=>
$id
));
$res
=
array
(
'status'
=>
'error'
,
'is_result'
=>
$is_result
,
'message'
=>
'
Selected Doctor Not Available'
);
}
}
else
{
$res
=
array
(
'status'
=>
'error'
,
'message'
=>
'No Booking Found'
);
}
return
$res
;
}
/*function push_sent($fcm_data,$type) {
...
...
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