Commit 47cf574c by Jansa Jose

doctor booking change

parent 8728a87f
...@@ -1194,7 +1194,7 @@ class Webservice extends CI_Controller { ...@@ -1194,7 +1194,7 @@ class Webservice extends CI_Controller {
if(isset($headers['Auth']) && strlen($headers['Auth'])){ if(isset($headers['Auth']) && strlen($headers['Auth'])){
$check_authToken = $this->Webservice_model->check_auth_token($headers['Auth']); $check_authToken = $this->Webservice_model->check_auth_token($headers['Auth']);
if($check_authToken){ if($check_authToken){
if(isset($data['doctor_id']) && strlen($data['doctor_id']) && isset($data['clinic_id']) && strlen($data['clinic_id']) && isset($data['date']) && strlen($data['date']) && isset($data['time']) && strlen($data['time']) && isset($data['amount']) && strlen($data['amount']) /*&& isset($data['booking_status']) && strlen($data['booking_status'])*/) { if(isset($data['doctor_id']) && strlen($data['doctor_id']) && isset($data['clinic_id']) && strlen($data['clinic_id']) && isset($data['date']) && strlen($data['date']) && isset($data['time']) && strlen($data['time']) && isset($data['amount']) && strlen($data['amount']) /*&& isset($data['booking_status']) && strlen($data['booking_status'])*/&& isset($data['payment_mode']) && strlen($data['payment_mode'])) {
$result = $this->Webservice_model->doctor_booking($data,$headers['Auth']); $result = $this->Webservice_model->doctor_booking($data,$headers['Auth']);
if($result['status'] == 'success'){ if($result['status'] == 'success'){
......
...@@ -879,15 +879,23 @@ class Webservice_model extends CI_Model { ...@@ -879,15 +879,23 @@ class Webservice_model extends CI_Model {
}else{ }else{
$visit = '0'; $visit = '0';
$free_visit_status = '0'; $free_visit_status = '0';
if($data['payment_mode'] == '1'){
$payment_status = '1';
}else{
$payment_status = '0'; $payment_status = '0';
}
$is_payment_required = true; $is_payment_required = true;
} }
}else{ }else{
$visit = '0'; $visit = '0';
$is_payment_required = true; $is_payment_required = true;
$free_visit_status = '0'; $free_visit_status = '0';
if($data['payment_mode'] == '1'){
$payment_status = '1';
}else{
$payment_status = '0'; $payment_status = '0';
} }
}
if(isset($promocode) && ($promocode != '')){ if(isset($promocode) && ($promocode != '')){
$new_amnt = ($data['amount'] * $promocode['promo_data']['amount'])/100; $new_amnt = ($data['amount'] * $promocode['promo_data']['amount'])/100;
......
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