Commit 558b42b0 by Jemsheer K D

Merge branch 'master' into client

parents aa5ab132 f0835528
...@@ -1605,6 +1605,7 @@ CASE when tbl_registration.gender='0' then 'MALE' when tbl_registration.gender=' ...@@ -1605,6 +1605,7 @@ CASE when tbl_registration.gender='0' then 'MALE' when tbl_registration.gender='
$query = $data["query"]; $query = $data["query"];
$where = 'tbl_clinic.name LIKE '."'$query%'"; $where = 'tbl_clinic.name LIKE '."'$query%'";
$this->db->where($where); $this->db->where($where);
$this->db->where('tbl_clinic.id !=','0');
} }
if(isset($data['speciality']) && strlen($data['speciality'])){ if(isset($data['speciality']) && strlen($data['speciality'])){
...@@ -1741,6 +1742,7 @@ CASE when tbl_registration.gender='0' then 'MALE' when tbl_registration.gender=' ...@@ -1741,6 +1742,7 @@ CASE when tbl_registration.gender='0' then 'MALE' when tbl_registration.gender='
$this->db->join('tbl_doctors','tbl_doctors.id = tbl_booking.doctor_id','INNER'); $this->db->join('tbl_doctors','tbl_doctors.id = tbl_booking.doctor_id','INNER');
$this->db->where('tbl_authtoken.authtoken',$authtoken); $this->db->where('tbl_authtoken.authtoken',$authtoken);
$this->db->where('tbl_booking.payment_status','1'); $this->db->where('tbl_booking.payment_status','1');
$this->db->order_by('tbl_booking.id','DESC');
$query = $this->db->get(); $query = $this->db->get();
if($query->num_rows() > 0){ if($query->num_rows() > 0){
$result = array('status'=>'success','data'=>$query->result_array()); $result = array('status'=>'success','data'=>$query->result_array());
...@@ -2555,7 +2557,9 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F ...@@ -2555,7 +2557,9 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F
} }
$ill = json_decode(decrypt_data($result['diseases'])); $ill = json_decode(decrypt_data($result['diseases']));
if($ill == ''){ // print_r( $ill );echo"<br>";
//print_r($ill->anamnese);exit();
if(!isset($ill->anamnese)){
$new = []; $new = [];
}else{ }else{
$new = array(); $new = array();
...@@ -2573,7 +2577,7 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F ...@@ -2573,7 +2577,7 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F
} }
$result['illness'] = $new; $result['illness'] = $new;
if($news['cause'] != ''){ if(isset($news)){
$others = $news; $others = $news;
}else{ }else{
$others = []; $others = [];
...@@ -2620,6 +2624,7 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F ...@@ -2620,6 +2624,7 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F
$tot = $tot + ($value->amount * $value->quantity); $tot = $tot + ($value->amount * $value->quantity);
} }
$result['services'] = $bud; $result['services'] = $bud;
$result['total'] = $tot ;
} }
unset($result['budget']); unset($result['budget']);
...@@ -2631,7 +2636,7 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F ...@@ -2631,7 +2636,7 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F
} }
unset($result['images']); unset($result['images']);
unset($result['booking_id']); unset($result['booking_id']);
$result['total'] = $tot ;
$res = array('status'=>'success','data'=>$result); $res = array('status'=>'success','data'=>$result);
} }
...@@ -3776,7 +3781,7 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F ...@@ -3776,7 +3781,7 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F
$this->db->update('tbl_medical_records',array('other_observations'=>encrypt_data($data['observations']),'images'=>$data['images']),array('booking_id'=>$data['booking_id'])); $this->db->update('tbl_medical_records',array('other_observations'=>encrypt_data($data['observations']),'images'=>$data['images']),array('booking_id'=>$data['booking_id']));
$doctor_wallet = $this->db->get_where('tbl_wallet_details',array('doctor_id'=>$doctor_id))->row(); $doctor_wallet = $this->db->get_where('tbl_wallet_details',array('doctor_id'=>$doctor_id))->row();
$earn = $res->total_sum - (($res->total_sum * $res->ipok_fee)/100); $earn = $res->total_sum - (($res->total_sum * $res->ipok_fee)/100);
if($res->visit_type == '0'){ if($res->visit_type == '0' && $res->payment_type == '2'){
if($doctor_wallet){ if($doctor_wallet){
$redem_earn = decrypt_data($doctor_wallet->reedem_earn) + $earn; $redem_earn = decrypt_data($doctor_wallet->reedem_earn) + $earn;
$future_earn = decrypt_data($doctor_wallet->future_earn) - $earn; $future_earn = decrypt_data($doctor_wallet->future_earn) - $earn;
...@@ -4005,7 +4010,7 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F ...@@ -4005,7 +4010,7 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F
} }
public function check_wait_listed($data){ public function check_wait_listed($data){
$check = $this->db->get_where('tbl_booking',array('doctor_id'=>$data['doctor_id'],'clinic_id'=>$data['clinic_id'],'date'=>$data['date'],'time'=>$data['time'])); $check = $this->db->get_where('tbl_booking',array('doctor_id'=>$data['doctor_id'],'clinic_id'=>$data['clinic_id'],'date'=>$data['date'],'time'=>$data['time'],'payment_status'=>'1'));
if($check->num_rows() > 0){ if($check->num_rows() > 0){
$is_booking = true; $is_booking = true;
}else{ }else{
......
...@@ -1146,7 +1146,6 @@ public function save_medicalrecord_finaldata() ...@@ -1146,7 +1146,6 @@ public function save_medicalrecord_finaldata()
exit(); exit();
} }
} }
} }
......
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