day book entry changes done in fees screen

This commit is contained in:
gandhimathi 2018-03-14 11:35:50 +05:30
parent 025f0eeadb
commit 9f1060ebdf

View File

@ -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'];