Commit b573cf9c by Jansa Jose

cancel booking from web

parent b23d1d0c
...@@ -2481,6 +2481,8 @@ class Webservice extends CI_Controller { ...@@ -2481,6 +2481,8 @@ class Webservice extends CI_Controller {
foreach ($result as $key => $value){ foreach ($result as $key => $value){
$book_data = $this->db->get_where('tbl_booking',array('id'=>$value['booking_id']))->row_array(); $book_data = $this->db->get_where('tbl_booking',array('id'=>$value['booking_id']))->row_array();
$booked_data = $this->db->get_where('tbl_booking',array('id'=>$value['free_booking_id']))->row_array();
$this->db->update('tbl_waiting_list_id_crone',array('status'=>'0'),array('id'=>$value['id'])); $this->db->update('tbl_waiting_list_id_crone',array('status'=>'0'),array('id'=>$value['id']));
$this->db->select('tbl_booking.id'); $this->db->select('tbl_booking.id');
...@@ -2511,9 +2513,9 @@ class Webservice extends CI_Controller { ...@@ -2511,9 +2513,9 @@ class Webservice extends CI_Controller {
$special = $this->db->get_where('tbl_specialization',array('id'=>$doctr_data['specialization']))->row(); $special = $this->db->get_where('tbl_specialization',array('id'=>$doctr_data['specialization']))->row();
$conslt_time = date('Y-m-d h:i:s'); $conslt_time = date('Y-m-d h:i:s');
$msg3 = "Your Wait Listed Appointment on ".date('d.m.Y h:i a',$next_day_consult[0]['time_start'])." can be changed to ".date('d.m.Y h:i a',$book_data['time_start'])." as the Time Slot is Available Now. Would you like to change the Appointment on Available Slot ?"; $msg3 = "Your Wait Listed Appointment on ".date('d.m.Y h:i a',$next_day_consult[0]['time_start'])." can be changed to ".date('d.m.Y h:i a',$booked_data['time_start'])." as the Time Slot is Available Now. Would you like to change the Appointment on Available Slot ?";
$this->db->insert('tbl_patient_notification',array('patient_id'=>$next_day_consult[0]['patient_id'],'type'=>'4','message'=>$msg3,'time'=>$conslt_time,'booking_id'=>$next_day_consult[0]['id'],'read_status'=>'0','free_booking_id'=>$value['free_booking_id'])); $this->db->insert('tbl_patient_notification',array('patient_id'=>$next_day_consult[0]['patient_id'],'type'=>'4','message'=>$msg3,'time'=>strtotime($conslt_time),'booking_id'=>$next_day_consult[0]['id'],'read_status'=>'0','free_booking_id'=>$value['free_booking_id']));
$new_patient_insert_id = $this->db->insert_id(); $new_patient_insert_id = $this->db->insert_id();
$fcm_user_new = $this->db->get_where('tbl_authtoken',array('userid'=>$next_day_consult[0]['patient_id']))->row(); $fcm_user_new = $this->db->get_where('tbl_authtoken',array('userid'=>$next_day_consult[0]['patient_id']))->row();
$new['id'] = $new_patient_insert_id; $new['id'] = $new_patient_insert_id;
......
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