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')
|
if ($this->request->getMethod() === 'GET')
|
||||||
{
|
{
|
||||||
$currentYear = date('Y');
|
$toDate = date('Y-m-d');
|
||||||
$currentMonth = date('m');
|
$fromDate = date('Y-m-d', strtotime('-90 days', strtotime($toDate)));
|
||||||
$startOfMonth = "$currentYear-$currentMonth-01";
|
|
||||||
$endOfMonth = date('Y-m-t');
|
|
||||||
$fromDate = $startOfMonth;
|
|
||||||
$toDate = $endOfMonth;
|
|
||||||
} else if ($this->request->getMethod() === 'POST') {
|
} else if ($this->request->getMethod() === 'POST') {
|
||||||
$fromDate = $this->request->getPost('fromDate');
|
$fromDate = $this->request->getPost('fromDate');
|
||||||
$toDate = $this->request->getPost('toDate');
|
$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')
|
->join('t_supplierdetailsn', 't_expense.supplier_id = t_supplierdetailsn.SupplierID', 'left')
|
||||||
->where('t_expense.isactive', 1)
|
->where('t_expense.isactive', 1)
|
||||||
->where('t_expense.created_on >=',"$fromDate")
|
->where('t_expense.created_on >=',"$fromDate")
|
||||||
->where('t_expense.created_on <=',"$toDate")
|
|
||||||
->orderBy('t_expense.created_on', 'DESC')
|
->orderBy('t_expense.created_on', 'DESC')
|
||||||
->get()->getResult();
|
->get()->getResult();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -130,6 +130,10 @@
|
|||||||
<?php
|
<?php
|
||||||
if (!empty($expense_list)) {
|
if (!empty($expense_list)) {
|
||||||
foreach ($expense_list as $record) {
|
foreach ($expense_list as $record) {
|
||||||
|
|
||||||
|
$record = (array) $record;
|
||||||
|
|
||||||
|
|
||||||
$fileExists = 0;
|
$fileExists = 0;
|
||||||
$fileUrl = '';
|
$fileUrl = '';
|
||||||
if ($record['transporter_file']) {
|
if ($record['transporter_file']) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user