changes for filter and print

This commit is contained in:
2024-09-29 16:59:27 +05:45
parent 497f567cba
commit 684e01bf48
1335 changed files with 38709 additions and 74987 deletions

View File

@ -115,7 +115,7 @@ $BIBAccounts = new BIBAccounts();
<div class="card-header">
<h3 class="card-title mt-1"><?php echo $pageTitle; ?> </h3>
<div class="card-tools">
<form method="post" action="" id="FilterForm">
<form method="post" action=<?php echo base_url('accounts/reports/balance_sheet') ;?> id="FilterForm">
<!-- button with a dropdown -->
<div class="btn-group">
<button type="button" class="btn btn-success btn-sm dropdown-toggle" data-toggle="dropdown" data-offset="-52">
@ -203,7 +203,7 @@ $BIBAccounts = new BIBAccounts();
'showPeriod' => false,
);
?>
<?php $AccountGroups = $BIBAccounts->getAccountGroupsWithBalances(2); ?>
<?php $AccountGroups = $BIBAccounts->getAccountGroupsWithBalancesNew(2,$fiscalStart,$fiscalEnd); ?>
<?php $Side1Total = 0; ?>
<div class="col-6 p-0 m-0 gy-0">
<div class="table-responsive">
@ -216,7 +216,7 @@ $BIBAccounts = new BIBAccounts();
</thead>
<tbody>
<?php $AccountGroups = $BIBAccounts->getAccountGroupsWithBalances(2); ?>
<?php $AccountGroups = $BIBAccounts->getAccountGroupsWithBalancesNew(2,$fiscalStart,$fiscalEnd); ?>
<?php $Side1Total = 0; ?>
<?php
// Initialize variables for column totals
@ -245,7 +245,7 @@ $BIBAccounts = new BIBAccounts();
$Side1Total += $group->closing_balance;
?>
<?php endforeach; ?>
<?php $AccountGroups = $BIBAccounts->getAccountGroupsWithBalances(5); ?>
<?php $AccountGroups = $BIBAccounts->getAccountGroupsWithBalancesNew(5,$fiscalStart,$fiscalEnd); ?>
<?php
// Initialize variables for column totals
@ -291,7 +291,7 @@ $BIBAccounts = new BIBAccounts();
</tr>
</thead>
<tbody>
<?php $AccountGroups = $BIBAccounts->getAccountGroupsWithBalances(1); ?>
<?php $AccountGroups = $BIBAccounts->getAccountGroupsWithBalancesNew(1,$fiscalStart,$fiscalEnd); ?>
<?php
// Initialize variables for column totals
@ -328,14 +328,14 @@ $BIBAccounts = new BIBAccounts();
</tbody>
</table>
</div>
</div>
<?php
// pre($BIBAccounts->getAccountGroupsWithBalances(4));
$TotalIncomes = $BIBAccounts->getAccountGroupsWithBalances(3)[0]->closing_balance;
$TotalExpenses = $BIBAccounts->getAccountGroupsWithBalances(4)[0]->closing_balance;
$TotalIncomes = ($BIBAccounts->getAccountGroupsWithBalancesNew(3,$fiscalStart,$fiscalEnd)[0]->closing_balance) ?? 0;
$TotalExpenses = ($BIBAccounts->getAccountGroupsWithBalancesNew(4,$fiscalStart,$fiscalEnd)[0]->closing_balance) ?? 0;
$PL = $TotalIncomes - $TotalExpenses;
$Side1Total += $PL;
?>