Commit ad985c05 by Jansa Jose

ail app

parent cebed6b4
......@@ -2513,7 +2513,7 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F
$query = $this->db->get_where('tbl_booking',array('id'=>$id))->row_array();
if($query){
if($query['medical_record_id'] != '0'){
$this->db->select('tbl_doctors.id as doctor_id,tbl_doctors.name as doctor_name,tbl_doctors.profile_pic as doctor_profile_photo,tbl_doctors.price as consultation_fee,tbl_doctors.consultation_duration,tbl_specialization.specialization_name as doctor_speciality,tbl_booking.date,tbl_booking.total_sum as total,tbl_medical_records.*,tbl_registration.profile_photo,tbl_booking.time_start');
$this->db->select('tbl_doctors.id as doctor_id,tbl_doctors.name as doctor_name,tbl_doctors.profile_pic as doctor_profile_photo,tbl_doctors.price as consultation_fee,tbl_doctors.consultation_duration,tbl_specialization.specialization_name as doctor_speciality,tbl_booking.date,tbl_medical_records.*,tbl_registration.profile_photo,tbl_booking.time_start');
$this->db->join('tbl_doctors','tbl_doctors.id = tbl_booking.doctor_id');
$this->db->join('tbl_specialization','tbl_specialization.id = tbl_doctors.specialization');
$this->db->join('tbl_medical_records','tbl_medical_records.id = tbl_booking.medical_record_id');
......@@ -2613,9 +2613,11 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F
if($budget == ''){
$budget = [];
}else{
$tot = 0;
foreach ($budget as $key => $value) {
$bud[$key]['service_name'] = $value->procedure;
$bud[$key]['service_charge'] = $value->amount * $value->quantity;
$tot = $tot + ($value->amount * $value->quantity);
}
$result['services'] = $bud;
}
......@@ -2629,6 +2631,7 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F
}
unset($result['images']);
unset($result['booking_id']);
$result['total'] = $tot ;
$res = array('status'=>'success','data'=>$result);
}
......
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