From 9f1060ebdf2518f6f45c12b3594a271debceea23 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Wed, 14 Mar 2018 11:35:50 +0530 Subject: [PATCH] day book entry changes done in fees screen --- Apollo/api/application/models/Fees_status_model.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Apollo/api/application/models/Fees_status_model.php b/Apollo/api/application/models/Fees_status_model.php index 99bbb1c9..c123498b 100755 --- a/Apollo/api/application/models/Fees_status_model.php +++ b/Apollo/api/application/models/Fees_status_model.php @@ -1120,7 +1120,6 @@ class Fees_status_model extends CI_Model * created by kms * */ public function insertDayBookMaster($data=null,$paymentID){ - $this->db->distinct(); $this->db->select('Firstname'); $this->db->where('StudentID', $data['StudentID']); $getStudentName=$this->db->get(STUDENTS)->result(); @@ -1148,7 +1147,7 @@ class Fees_status_model extends CI_Model $insertArray['Name'] = $getIncome->TypeID; $insertArray['Type'] = $getIncome->ID; $checkInsertIn=$this->add_dayBook($insertArray); - if($checkInsertIn['addDayBookStatus']==true){ + if($checkInsertIn['addDayBookStatus']==true AND $data['ModeOfPayment']!='CASH'){ // this is for expense come entry $now1 = new DateTime(); $now1->setTimezone(new DateTimezone('Asia/Kolkata')); @@ -1159,7 +1158,7 @@ class Fees_status_model extends CI_Model $expenseArray['Description'] = $data['InternalComments']; $expenseArray['PaidDescription'] = ""; $expenseArray['Amount'] = $data['BillAmount']; - $expenseArray['Status'] = 'Approved'; + $expenseArray['Status'] = 'Pending'; $expenseArray['PaymentStatus'] = false; $expenseArray['FeesPaymentID'] = $paymentID; $expenseArray['VoucherNumber'] = $data['BillNO'];