Commit d0725c34 by Jansa Jose

Merge branch 'jansa'

parents 1c53d7ce a51afca5
...@@ -2008,7 +2008,7 @@ print_r(date('H:i',$ms));exit();*/ ...@@ -2008,7 +2008,7 @@ print_r(date('H:i',$ms));exit();*/
if((isset($data['doctor_id'])) && strlen($data['doctor_id']) && isset($data['review']) && strlen($data['review']) && isset($data['medical_record_id']) && strlen($data['medical_record_id'])){ if((isset($data['doctor_id'])) && strlen($data['doctor_id']) && isset($data['review']) && strlen($data['review']) && isset($data['medical_record_id']) && strlen($data['medical_record_id'])){
$result = $this->Webservice_model->doctor_review($data,$headers['Auth']); $result = $this->Webservice_model->doctor_review($data,$headers['Auth']);
if($result['status'] == 'success'){ if($result['status'] == 'success'){
$res = array("status"=> "success"); $res = array("status"=> "success",'data'=>$result['data']);
}else{ }else{
$res = array( $res = array(
"status"=> "error", "status"=> "error",
......
...@@ -1879,6 +1879,7 @@ class Webservice_model extends CI_Model { ...@@ -1879,6 +1879,7 @@ class Webservice_model extends CI_Model {
} }
unset($data['medical_record_id']); unset($data['medical_record_id']);
if($this->db->insert('tbl_review',$data)){ if($this->db->insert('tbl_review',$data)){
$insertid = $this->db->insert_id();
$this->db->insert('tbl_doctor_notifications',array('doctor_id'=>$data['doctor_id'],'type'=>'1','message'=>$msg,'time'=>$data['date'],'read_status'=>'0')); $this->db->insert('tbl_doctor_notifications',array('doctor_id'=>$data['doctor_id'],'type'=>'1','message'=>$msg,'time'=>$data['date'],'read_status'=>'0'));
$doctor_insert_id = $this->db->insert_id(); $doctor_insert_id = $this->db->insert_id();
$fcm_doctor = $this->db->get_where('tbl_authtoken_doctors',array('doctor_id'=>$data['doctor_id']))->row(); $fcm_doctor = $this->db->get_where('tbl_authtoken_doctors',array('doctor_id'=>$data['doctor_id']))->row();
...@@ -1890,7 +1891,7 @@ class Webservice_model extends CI_Model { ...@@ -1890,7 +1891,7 @@ class Webservice_model extends CI_Model {
$doctor_type = '2'; $doctor_type = '2';
$doctor_push = $this->push_sent($news,$doctor_type); $doctor_push = $this->push_sent($news,$doctor_type);
$res = array("status"=>"success","msg" =>"Insertion Success"); $res = array("status"=>"success","msg" =>"Insertion Success",'data'=>array('id'=>$insertid,'review'=>$data['review']));
}else{ }else{
$res = array("status"=>"failed","msg" =>"Insertion failed"); $res = array("status"=>"failed","msg" =>"Insertion failed");
} }
...@@ -2590,7 +2591,7 @@ class Webservice_model extends CI_Model { ...@@ -2590,7 +2591,7 @@ class Webservice_model extends CI_Model {
}else{ }else{
foreach ($budget as $key => $value) { foreach ($budget as $key => $value) {
$bud[$key]['service_name'] = $value->procedure; $bud[$key]['service_name'] = $value->procedure;
$bud[$key]['service_charge'] = $value->amount; $bud[$key]['service_charge'] = $value->amount * $value->quantity;
} }
$result['services'] = $bud; $result['services'] = $bud;
} }
......
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