Commit 29235a76 by Jansa Jose

app bukng

parent f89932ac
......@@ -1285,7 +1285,7 @@ CASE when tbl_registration.gender='0' then 'MALE' when tbl_registration.gender='
if($this->db->insert('tbl_booking',array('doctor_id'=>$data['doctor_id'],'clinic_id'=>$data['clinic_id'],'patient_id'=>$patientid['userid'],'ipok_fee'=>$ipokefees,'date'=>$data['date'],'time'=>$data['time'],'booking_status'=>'1','payment_status'=>$payment_status,'free_visit_status'=>$free_visit_status,'visit_type'=>$visit,'amount'=>$data['amount'],'promo_name'=>$promo_name,'promo_amount'=>$new_amnt,'payment_type'=>$data['payment_mode'],'total_sum'=>$diff,'time_start'=>$start_time,'time_end'=>$end_time,'requested_date'=>time()))){
$insert_id = $this->db->insert_id();
if($visit == '0'){
/*if($visit == '0'){
$doctor_wallet = $this->db->get_where('tbl_wallet_details',array('doctor_id'=>$data['doctor_id']))->row();
$ipkfee = $this->db->get('settings')->row();
$futures = $diff - (($diff * $ipkfee->ipok_fee)/100);
......@@ -1297,7 +1297,7 @@ CASE when tbl_registration.gender='0' then 'MALE' when tbl_registration.gender='
}else{
$this->db->insert('tbl_wallet_details',array('future_earn'=>encrypt_data($futures),'total_earn'=>encrypt_data($futures),'doctor_id'=>$data['doctor_id'],'reedem_earn'=>encrypt_data('0')));
}
}
}*/
if($payment_status == '1'){
$this->db->insert('tbl_patient_notification',array('patient_id'=>$patientid['userid'],'type'=>'0','message'=>$msg,'time'=>$conslt_time,'booking_id'=>$insert_id,'read_status'=>'0'));
......@@ -2240,7 +2240,7 @@ CASE when tbl_doctors.gender='0' then 'MALE' when tbl_doctors.gender='1' then 'F
$doctor_type = '2';
$doctor_push = $this->push_sent($news,$doctor_type);
}
if($query['visit_type'] == '0'){
if($query['visit_type'] == '0' && $query['payment_type'] == '2'){
$doctor_wallet = $this->db->get_where('tbl_wallet_details',array('doctor_id'=>$query['doctor_id']))->row();
$earn = $query['total_sum'] - (($query['total_sum'] * $query['ipok_fee'])/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