From 5aa45faa0c01f3deb24f1a80c8c1d8f939026b45 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Tue, 5 Jun 2018 15:05:11 +0530 Subject: [PATCH] fees status issues in student view --- .../api/application/models/Studentview_model.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Apollo/api/application/models/Studentview_model.php b/Apollo/api/application/models/Studentview_model.php index 1aa31e92..5ccaf5b8 100755 --- a/Apollo/api/application/models/Studentview_model.php +++ b/Apollo/api/application/models/Studentview_model.php @@ -300,6 +300,22 @@ class Studentview_model extends CI_Model else{ $storePaidDetails['BalanceAmount']=$storePaidDetails['PayableAmount'] - $paidBillAmount[0]->PaidBillAmount; } + // sepearte for student waiver and referral bill list + $this->db->select('ifnull(SUM((BillAmount)),0) as StudentWaiverRefAmount'); + $this->db->where('FeesId',$feeRow->FeesID); + $this->db->where_in('ModeOfPayment',$serachArray); + $studentWaiverRefAmount = $this->db->get(STUDENTS_FEES_PAID)->result(); + + $storePaidDetails['StudentWaiverRefAmount']=$studentWaiverRefAmount[0]->StudentWaiverRefAmount; + + $this->db->select('ifnull(SUM((BillAmount)),0) as StudentPaidAmount'); + $this->db->where('FeesId',$feeRow->FeesID); + $this->db->where('ModeOfPayment !=',WAIVER); + $this->db->where('ModeOfPayment !=',REFERRAL); + $this->db->where('IsActive', '1'); + $studentPaidAmount = $this->db->get(STUDENTS_FEES_PAID)->result(); + + $storePaidDetails['StudentPaidAmount']=$studentPaidAmount[0]->StudentPaidAmount; $storePaidDetails['BatchName'] = "Not Applicable"; $storePaidDetails['BatchDate'] = "";