fees status issues fixed

This commit is contained in:
gandhimathi 2018-06-05 15:04:17 +05:30
parent aea619fe56
commit cc162651a1

View File

@ -422,9 +422,26 @@ class Fees_status_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('IsActive','1');
$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('IsActive','1');
$this->db->where('ModeOfPayment !=',WAIVER);
$this->db->where('ModeOfPayment !=',REFERRAL);
$studentPaidAmount = $this->db->get(STUDENTS_FEES_PAID)->result();
$storePaidDetails['StudentPaidAmount']=$studentPaidAmount[0]->StudentPaidAmount;
// for get paid bill details
$this->db->select('ifnull(SUM((BillAmount)),0) as BillAmount,BillNO,BillDate,ModeOfPayment,ReceiptNo,BR.BranchName,BR.Address,BR.LogoPath,STF.Firstname as ReceivedBy');
$this->db->select('ifnull(SUM((BillAmount)),0) as BillAmount,BillNO,BillDate,ModeOfPayment,ReceiptNo,BR.BranchName,BR.Address,BR.LogoPath,BR.FeesReceiptTitle,STF.Firstname as ReceivedBy,SFP.CommentsForStudent,SFP.InternalComments');
$this->db->from(STUDENTS_FEES_PAID.' as SFP');
$this->db->join(BRANCH.' as BR','BR.BranchCode = SFP.UpdatedBy','left');
$this->db->join(LOGIN.' as LO','LO.ID = SFP.CreatedBy');