mirror of
https://github.com/itflow-org/itflow
synced 2026-03-28 08:15:38 +00:00
Added Total Equities and Liabilities
This commit is contained in:
@@ -26,6 +26,7 @@ $result_accounts = mysqli_query($mysqli, $sql_accounts);
|
|||||||
$total_assets = 0;
|
$total_assets = 0;
|
||||||
$total_liabilities = 0;
|
$total_liabilities = 0;
|
||||||
$total_equity = 0;
|
$total_equity = 0;
|
||||||
|
$currency = $session_company_currency;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="card card-dark">
|
<div class="card card-dark">
|
||||||
@@ -107,7 +108,7 @@ $total_equity = 0;
|
|||||||
mysqli_data_seek($result_accounts, 0); // Reset the result pointer to the start
|
mysqli_data_seek($result_accounts, 0); // Reset the result pointer to the start
|
||||||
while ($row = mysqli_fetch_array($result_accounts)) {
|
while ($row = mysqli_fetch_array($result_accounts)) {
|
||||||
$balance = $row['opening_balance'] + $row['total_payments'] + $row['total_revenues'] - $row['total_expenses'];
|
$balance = $row['opening_balance'] + $row['total_payments'] + $row['total_revenues'] - $row['total_expenses'];
|
||||||
$account_type = $row['account_type'];
|
$account_type = $row['account_type'];
|
||||||
if ($account_type >= 30) {
|
if ($account_type >= 30) {
|
||||||
// Display equity account row
|
// Display equity account row
|
||||||
echoAccountRow($row, $balance);
|
echoAccountRow($row, $balance);
|
||||||
@@ -121,6 +122,18 @@ $total_equity = 0;
|
|||||||
<th class="text-uppercase">Total Equity</th>
|
<th class="text-uppercase">Total Equity</th>
|
||||||
<th class="text-right"><?php echo $formatted_total_equity; ?></th>
|
<th class="text-right"><?php echo $formatted_total_equity; ?></th>
|
||||||
</tr>
|
</tr>
|
||||||
|
<!-- Total Equity and Liabilities -->
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$total_liabilities_and_equity = $total_liabilities + $total_equity;
|
||||||
|
$formatted_total_liabilities_and_equity = numfmt_format_currency($currency_format, $total_liabilities_and_equity, $currency);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th></th>
|
||||||
|
<th class="text-uppercase">Total Liabilities and Equity</th>
|
||||||
|
<th class="text-right"><?php echo $formatted_total_liabilities_and_equity; ?></th>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user