This commit is contained in:
Raju Shrestha
2024-08-25 18:37:52 +05:45
parent 78670b1b95
commit 161703be17
11 changed files with 100 additions and 263 deletions

View File

@ -1,5 +1,5 @@
<?php
$t="INSERT INTO tbl_acgroups (acgroup_id, acgroup_code, acgroup_name, posting_side, created_on, created_by, remarks, status, display_order)
$t = "INSERT INTO tbl_acgroups (acgroup_id, acgroup_code, acgroup_name, posting_side, created_on, created_by, remarks, status, display_order)
SELECT 5, '5', 'Equity', 'CR', '2023-05-22', 'admin', '', 1, 2
WHERE NOT EXISTS (
SELECT 1 FROM tbl_acgroups WHERE acgroup_id = 5
@ -12,16 +12,14 @@ $AssetsAccounts = $this->acc->getAccountsByGroup(1);
$LiabilitiesTotal = $this->acc->getAccountBalanceByGroup(2);
$EquityTotal = $this->acc->getAccountBalanceByGroup(5);
$AssetsTotal = $this->acc->getAccountBalanceByGroup(1, false);
$IncomeAccounts = $this->acc->getAccountsByGroup(3);
$ExpenseAccounts = $this->acc->getAccountsByGroup(4);
$IncomesTotal = $this->acc->getAccountBalanceByGroup(3);
$ExpensesTotal = $this->acc->getAccountBalanceByGroup(4);
$PL = $IncomesTotal - $ExpensesTotal;
$LiabilitiesTotal=$LiabilitiesTotal+$EquityTotal+$PL;
$LiabilitiesTotal = $LiabilitiesTotal + $EquityTotal + $PL;
?>
<div class="content-wrapper">
<div class="content">
<div class="container-fluid">
<div class="row">
@ -39,13 +37,11 @@ $LiabilitiesTotal=$LiabilitiesTotal+$EquityTotal+$PL;
</thead>
<tbody>
<tr class="bg-dark">
<th>Liabilities</th>
<th class="col-2">Amount</th>
<th>Assets</th>
<th class="col-2">Amount</th>
</tr>
<tr class="bg-light">
<td colspan="2">
<?php $this->acc->showTable($LiabilitiesAccounts); ?>
@ -54,33 +50,22 @@ $LiabilitiesTotal=$LiabilitiesTotal+$EquityTotal+$PL;
<td colspan="2">
<?php $this->acc->showTable($AssetsAccounts, false); ?>
</td>
</tr>
</tbody>
<tfoot>
<tr class="bg-light">
<th>Net Profit:</th>
<th><?php echo myCurrency($PL); ?></th>
<th></th>
<th></th>
</tr>
<tr class="bg-light">
<th>Total Liabilities:</th>
<th><?php echo myCurrency($LiabilitiesTotal); ?></th>
<th>Total Assets: </th>
<th><?php echo myCurrency($AssetsTotal); ?></th>
</tr>
</tfoot>
</table>
</div>
</div>