cash flow

This commit is contained in:
Raju Shrestha 2024-08-26 13:36:59 +05:45
parent 15b3e542a3
commit 4109787bc4
2 changed files with 56 additions and 22 deletions

View File

@ -90,6 +90,36 @@ $PL = $IncomesTotal - $ExpensesTotal;
box-shadow: inset 0 0 0 transparent; box-shadow: inset 0 0 0 transparent;
transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out; transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
} }
.table1 {
border: 0px !important;
padding: 0;
margin: 10 !important;
width: 100%;
vertical-align: middle;
}
.table-responsive {
overflow-x: auto;
}
.card-body {
-webkit-flex: 1 1 auto;
-ms-flex: 1 1 auto;
flex: 1 1 auto;
min-height: 1px;
padding: 0;
}
table {
border: 1px solid #ddd;
border-collapse: collapse;
}
.card-body.p-0 .table tbody>tr>td:last-of-type, .card-body.p-0 .table tbody>tr>th:last-of-type, .card-body.p-0 .table tfoot>tr>td:last-of-type, .card-body.p-0 .table tfoot>tr>th:last-of-type, .card-body.p-0 .table thead>tr>td:last-of-type, .card-body.p-0 .table thead>tr>th:last-of-type {
padding-right:0!important;
}
.text-bold{
font-weight: 900;
}
</style> </style>
<div class="content-wrapper"> <div class="content-wrapper">
<section class="content"> <section class="content">
@ -235,15 +265,19 @@ $PL = $IncomesTotal - $ExpensesTotal;
</div> --> </div> -->
<div class="card-body table-responsive p-0"> <div class="card-body table-responsive p-0">
<?php $IncomesExpenses = $BIBAccounts->prepareIncomeExpenses() ?> <?php $IncomesExpenses = $BIBAccounts->prepareIncomeExpenses() ?>
<table class="table table-head-fixed table-bordered g-0">
<table class="table table-bordered p-0 ">
<thead> <thead>
<tr> <tr>
<th class="" width="30%"><?php myLang("Cash inflow"); ?></th> <th class="" width="30%"><?php myLang("Cash inflow"); ?></th>
<th class="text-right" width="10%"></th> <th class="text-right" width="10%"></th>
<th class="text-right pr-2" width="10%"><?php myLang("Amount"); ?></th> <th class="text-right pr-1" width="10%"><?php myLang("Amount"); ?></th>
<th class="pl-2" width="30%"><?php echo myLang("Cash outflow"); ?></th> <th class="pl-2" width="30%"><?php echo myLang("Cash outflow"); ?></th>
<th class="text-right" width="10%"></th> <th class="text-right" width="10%"></th>
<th class="text-right pr-3" width="10%"><?php myLang("Amount"); ?></th> <th class="text-right pr-1" width="10%"><?php myLang("Amount"); ?></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -262,15 +296,15 @@ $PL = $IncomesTotal - $ExpensesTotal;
</tr> --> </tr> -->
<?php elseif ($Incomes['account'] == "CATEGORY TOTAL") : ?> <?php elseif ($Incomes['account'] == "CATEGORY TOTAL") : ?>
<tr class="parent-row" class="group-heading" data-toggle="collapse" data-target="#group_<?php echo $index; ?>"> <tr class="parent-row" class="group-heading" data-toggle="collapse" data-target="#group_<?php echo $index; ?>">
<td class="pr-2" width="60%"><b><?php echo $Incomes['category']; ?></b></td> <td class="" width="60%"><b><?php echo $Incomes['category']; ?></b></td>
<td width="20%"></td> <td width="20%"></td>
<td class="text-right pr-2" width="20%"><?php echo myCurrency($Incomes['amount']); ?></td> <td class="text-right " width="20%"><?php echo myCurrency($Incomes['amount']); ?></td>
</tr> </tr>
<?php else : ?> <?php else : ?>
<?php $total1 += $Incomes['amount']; ?> <?php $total1 += $Incomes['amount']; ?>
<tr class="collapse" data-target="#group_<?php echo $index; ?>"> <tr class="collapse" data-target="#group_<?php echo $index; ?>">
<td class="pr-2" width="60%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $Incomes['account']; ?></td> <td class="" width="60%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $Incomes['account']; ?></td>
<td class="text-right pr-2" width="20%"><?php echo myCurrency($Incomes['amount']); ?></td> <td class="text-right " width="20%"><?php echo myCurrency($Incomes['amount']); ?></td>
<td width="20%"></td> <td width="20%"></td>
</tr> </tr>
<?php endif; ?> <?php endif; ?>
@ -279,7 +313,7 @@ $PL = $IncomesTotal - $ExpensesTotal;
</table> </table>
</td> </td>
<td colspan=3 class="p-0"> <td colspan=3 class="p-0">
<table class="table g-0"> <table class="table p-0">
<?php $total = 0; <?php $total = 0;
foreach ($IncomesExpenses['Expenses'] as $Expenses) { foreach ($IncomesExpenses['Expenses'] as $Expenses) {
if ($Expenses['account'] == "GROUP TOTAL") : ?> if ($Expenses['account'] == "GROUP TOTAL") : ?>
@ -292,7 +326,7 @@ $PL = $IncomesTotal - $ExpensesTotal;
<tr data-toggle="collapse" data-target="#group_<?php echo $counter; ?>"> <tr data-toggle="collapse" data-target="#group_<?php echo $counter; ?>">
<td class="" width="60%"><b><?php echo $Expenses['category']; ?></b></td> <td class="" width="60%"><b><?php echo $Expenses['category']; ?></b></td>
<td width="20%"></td> <td width="20%"></td>
<td class="text-right pr-2" width="20%"><?php echo myCurrency($Expenses['amount']); ?></td> <td class="text-right " width="20%"><?php echo myCurrency($Expenses['amount']); ?></td>
</tr> </tr>
<?php else : ?> <?php else : ?>
<?php $total += $Expenses['amount']; ?> <?php $total += $Expenses['amount']; ?>
@ -308,20 +342,20 @@ $PL = $IncomesTotal - $ExpensesTotal;
</tr> </tr>
</tbody> </tbody>
<tr> <tr>
<th>Total</th> <th class="p-1">Total</th>
<td></td> <td></td>
<td class="text-right pr-2"><?php echo myCurrency($total1); ?></td> <td class="text-right text-bold"><?php echo myCurrency($total1); ?></td>
<th>Total</th> <th class="p-1">Total</th>
<td></td> <td></td>
<td class="text-right"><?php echo myCurrency($total); ?></td> <td class="text-right text-bold"><?php echo myCurrency($total); ?></td>
</tr> </tr>
<tr> <tr>
<th></th> <th></th>
<td></td> <td></td>
<td class="text-right"></td> <td class="text-right"></td>
<th>Net Inflow</th> <th class="pl-1">Net Inflow</th>
<td></td> <td></td>
<td class="text-right pr-2"><?php echo myCurrency($total1 - $total); ?></td> <td class="text-right text-bold"><?php echo myCurrency($total1 - $total); ?></td>
</tr> </tr>
<?php $Bank = $BIBAccounts->getAccountCategoriesWithBalances(null, 2); ?> <?php $Bank = $BIBAccounts->getAccountCategoriesWithBalances(null, 2); ?>
<?php foreach ($Bank->accounts as $account) : ?> <?php foreach ($Bank->accounts as $account) : ?>
@ -329,9 +363,9 @@ $PL = $IncomesTotal - $ExpensesTotal;
<th></th> <th></th>
<td></td> <td></td>
<td class="text-right"></td> <td class="text-right"></td>
<th><?php echo $account->account_name; ?></th> <th class="pl-1"><?php echo $account->account_name; ?></th>
<td></td> <td></td>
<td class="text-right"><?php echo myCurrency($account->balances['dr_total'] - $account->balances['cr_total']); ?></td> <td class="text-right text-bold"><?php echo myCurrency($account->balances['dr_total'] - $account->balances['cr_total']); ?></td>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>
<?php $Cash = $BIBAccounts->getAccountCategoriesWithBalances(null, 3); ?> <?php $Cash = $BIBAccounts->getAccountCategoriesWithBalances(null, 3); ?>
@ -340,9 +374,9 @@ $PL = $IncomesTotal - $ExpensesTotal;
<th></th> <th></th>
<td></td> <td></td>
<td class="text-right"></td> <td class="text-right"></td>
<th><?php echo $account->account_name; ?></th> <th class="pl-1"><?php echo $account->account_name; ?></th>
<td></td> <td></td>
<td class="text-right"><?php echo myCurrency($account->balances['dr_total'] - $account->balances['cr_total']); ?></td> <td class="text-right text-bold"><?php echo myCurrency($account->balances['dr_total'] - $account->balances['cr_total']); ?></td>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>
</table> </table>

View File

@ -123,9 +123,9 @@ margin-bottom: .5rem;
.select2-container--default .select2-selection--single .select2-selection__arrow b { .select2-container--default .select2-selection--single .select2-selection__arrow b {
margin-top: 0 !important; margin-top: 0 !important;
} }
.card-body.p-0 .table tbody>tr>td:last-of-type, .card-body.p-0 .table tbody>tr>th:last-of-type, .card-body.p-0 .table tfoot>tr>td:last-of-type, .card-body.p-0 .table tfoot>tr>th:last-of-type, .card-body.p-0 .table thead>tr>td:last-of-type, .card-body.p-0 .table thead>tr>th:last-of-type { /* .card-body.p-0 .table tbody>tr>td:last-of-type, .card-body.p-0 .table tbody>tr>th:last-of-type, .card-body.p-0 .table tfoot>tr>td:last-of-type, .card-body.p-0 .table tfoot>tr>th:last-of-type, .card-body.p-0 .table thead>tr>td:last-of-type, .card-body.p-0 .table thead>tr>th:last-of-type {
padding-right: 0!important; padding-right: 0px!important;
} } */
.form-group textarea.form-control { .form-group textarea.form-control {
height: 50px !important; height: 50px !important;
} }