igr expense change vadivel J 02-1-2025
This commit is contained in:
parent
4213d7be16
commit
2a46955917
@ -27,12 +27,8 @@ class Expense extends BaseController
|
||||
|
||||
if ($this->request->getMethod() === 'GET')
|
||||
{
|
||||
$currentYear = date('Y');
|
||||
$currentMonth = date('m');
|
||||
$startOfMonth = "$currentYear-$currentMonth-01";
|
||||
$endOfMonth = date('Y-m-t');
|
||||
$fromDate = $startOfMonth;
|
||||
$toDate = $endOfMonth;
|
||||
$toDate = date('Y-m-d');
|
||||
$fromDate = date('Y-m-d', strtotime('-90 days', strtotime($toDate)));
|
||||
} else if ($this->request->getMethod() === 'POST') {
|
||||
$fromDate = $this->request->getPost('fromDate');
|
||||
$toDate = $this->request->getPost('toDate');
|
||||
|
||||
@ -29,7 +29,6 @@ class Expense_model extends Model
|
||||
->join('t_supplierdetailsn', 't_expense.supplier_id = t_supplierdetailsn.SupplierID', 'left')
|
||||
->where('t_expense.isactive', 1)
|
||||
->where('t_expense.created_on >=',"$fromDate")
|
||||
->where('t_expense.created_on <=',"$toDate")
|
||||
->orderBy('t_expense.created_on', 'DESC')
|
||||
->get()->getResult();
|
||||
}
|
||||
|
||||
@ -130,6 +130,10 @@
|
||||
<?php
|
||||
if (!empty($expense_list)) {
|
||||
foreach ($expense_list as $record) {
|
||||
|
||||
$record = (array) $record;
|
||||
|
||||
|
||||
$fileExists = 0;
|
||||
$fileUrl = '';
|
||||
if ($record['transporter_file']) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user