Compare commits

...

2 Commits

Author SHA1 Message Date
Sampanna Rimal
497f567cba balancesheet 2024-08-26 17:17:43 +05:45
Raju Shrestha
31e7f8de87 edit 2024-08-26 13:39:34 +05:45
2 changed files with 69 additions and 13 deletions

View File

@@ -191,7 +191,7 @@ $BIBAccounts = new BIBAccounts();
<!-- <button class="btn btn-secondary toggle-collapse mr-2" id="toggleShowAll">Toggle Collapse</button> --> <!-- <button class="btn btn-secondary toggle-collapse mr-2" id="toggleShowAll">Toggle Collapse</button> -->
<div class="card card-primary card-outline"> <div class="card card-primary card-outline">
<div class="card-body pl-2 pr-2"> <div class="card-body pl-2 ">
<div class="row"> <div class="row">
<?php <?php
@@ -205,9 +205,9 @@ $BIBAccounts = new BIBAccounts();
?> ?>
<?php $AccountGroups = $BIBAccounts->getAccountGroupsWithBalances(2); ?> <?php $AccountGroups = $BIBAccounts->getAccountGroupsWithBalances(2); ?>
<?php $Side1Total = 0; ?> <?php $Side1Total = 0; ?>
<div class="col-6 p-0"> <div class="col-6 p-0 m-0 gy-0">
<div class="table-responsive"> <div class="table-responsive">
<table class="table"> <table class="table mb-0 pb-0">
<thead> <thead>
<tr> <tr>
<th class="group-name pl-1">Particulars</th> <th class="group-name pl-1">Particulars</th>
@@ -281,9 +281,9 @@ $BIBAccounts = new BIBAccounts();
</table> </table>
</div> </div>
</div> </div>
<div class="col-6 p-0"> <div class="col-6 p-0 m-0">
<div class="table-responsive"> <div class="table-responsive">
<table class="table"> <table class="table mt-0 pt-0">
<thead> <thead>
<tr> <tr>
<th class="group-name pl-1">Particulars</th> <th class="group-name pl-1">Particulars</th>
@@ -305,7 +305,7 @@ $BIBAccounts = new BIBAccounts();
<?php foreach ($AccountGroups as $group) : ?> <?php foreach ($AccountGroups as $group) : ?>
<tr class="group-heading" data-toggle="collapse" data-target="#group_<?php echo $group->acgroup_id; ?>"> <tr class="group-heading" data-toggle="collapse" data-target="#group_<?php echo $group->acgroup_id; ?>">
<td class="group-name"><b><?php echo $group->acgroup_name; ?></b></td> <td class="group-name"><b><?php echo $group->acgroup_name; ?></b></td>
<td class="group-total text-right pr-2"><?php echo myCurrency(($group->posting_side == "DR") ? $group->closing_balance : 0); ?></td> <td class="group-total text-right "><?php echo myCurrency(($group->posting_side == "DR") ? $group->closing_balance : 0); ?></td>
</tr> </tr>
<tr> <tr>
<td colspan="7" class="group-details p-0"> <td colspan="7" class="group-details p-0">
@@ -332,14 +332,67 @@ $BIBAccounts = new BIBAccounts();
</table> </table>
</div> </div>
</div> </div>
<div class="col-12 p-0"> <?php
<table class="table">
<?php
// pre($BIBAccounts->getAccountGroupsWithBalances(4)); // pre($BIBAccounts->getAccountGroupsWithBalances(4));
$TotalIncomes = $BIBAccounts->getAccountGroupsWithBalances(3)[0]->closing_balance; $TotalIncomes = $BIBAccounts->getAccountGroupsWithBalances(3)[0]->closing_balance;
$TotalExpenses = $BIBAccounts->getAccountGroupsWithBalances(4)[0]->closing_balance; $TotalExpenses = $BIBAccounts->getAccountGroupsWithBalances(4)[0]->closing_balance;
$PL = $TotalIncomes - $TotalExpenses; $PL = $TotalIncomes - $TotalExpenses;
$Side1Total += $PL; $Side1Total += $PL;
?>
<div class="col-6 p-0 m-0 gy-0">
<table class="table">
<tr>
<td><b> Profit/Loss</b></td>
<td class="cr closing-cr"><?php echo myCurrency($PL); ?></td>
</tr>
<tr>
<td colspan="2" class="p-0">
<table class="table">
<tr>
<th class="pl-1">Total Amount</th>
<th class="cr closing-cr">
<?php echo myCurrency($Side1Total); ?>
</th>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div class="col-6 p-0 m-0 gy-0">
<table class="table">
<tr>
<th>&nbsp;</th>
<th>&nbsp;</th>
</tr>
<tr>
<td colspan="2" class="p-0">
<table class="table">
<tr>
<th class="pl-1">Total Amount</th>
<th class="dr closing-dr">
<?php echo myCurrency($totalClosingDr); ?>
</th>
</tr>
</table>
</td>
</tr>
</table>
</div>
<!-- <div class="col-12 p-0">
<table class="table">
<?php
// pre($BIBAccounts->getAccountGroupsWithBalances(4));
// $TotalIncomes = $BIBAccounts->getAccountGroupsWithBalances(3)[0]->closing_balance;
// $TotalExpenses = $BIBAccounts->getAccountGroupsWithBalances(4)[0]->closing_balance;
// $PL = $TotalIncomes - $TotalExpenses;
// $Side1Total += $PL;
?> ?>
<tr> <tr>
<td>Total Profit/Loss</td> <td>Total Profit/Loss</td>
@@ -369,7 +422,7 @@ $BIBAccounts = new BIBAccounts();
</td> </td>
</tr> </tr>
</table> </table>
</div> </div> -->

View File

@@ -112,6 +112,9 @@ $BIBAccounts = new BIBAccounts();
border: 1px solid #ddd; border: 1px solid #ddd;
border-collapse: collapse; border-collapse: collapse;
} }
.text-bold{
font-weight: 900;
}
</style> </style>
<div class="content-wrapper"> <div class="content-wrapper">
<div class="content"> <div class="content">
@@ -264,7 +267,7 @@ $BIBAccounts = new BIBAccounts();
<?php $PL = $incomes_totalClosingCr - $incomes_totalClosingDr; ?> <?php $PL = $incomes_totalClosingCr - $incomes_totalClosingDr; ?>
<tr> <tr>
<th class="p-1">Total Incomes</th> <th class="p-1">Total Incomes</th>
<th class="cr closing-cr"> <th class="cr closing-cr text-bold">
<?php if ($PL > 0) : ?> <?php if ($PL > 0) : ?>
<?php echo myCurrency($incomes_totalClosingCr); ?> <?php echo myCurrency($incomes_totalClosingCr); ?>
<?php else : ?> <?php else : ?>
@@ -323,7 +326,7 @@ $BIBAccounts = new BIBAccounts();
<!-- <th></th> <!-- <th></th>
<th></th> --> <th></th> -->
<th class="pl-1">Total Profit</th> <th class="pl-1">Total Profit</th>
<th class="cr closing-cr text-right"><?php echo myCurrency($PL); ?></th> <th class="cr closing-cr text-right text-bold"><?php echo myCurrency($PL); ?></th>
</tr> </tr>
@@ -331,7 +334,7 @@ $BIBAccounts = new BIBAccounts();
</tbody> </tbody>
<tfoot> <tfoot>
<th class="pl-1">Total Expenses</th> <th class="pl-1">Total Expenses</th>
<th class="dr closing-dr"> <th class="dr closing-dr text-bold">
<?php if ($PL > 0) : ?> <?php if ($PL > 0) : ?>
<?php echo myCurrency($totalClosingDr + abs($PL)); ?> <?php echo myCurrency($totalClosingDr + abs($PL)); ?>