accounting Reports

This commit is contained in:
Thanakorn S
2026-05-23 15:07:11 +07:00
parent 15618f4955
commit 4bb378a905
10 changed files with 310 additions and 52 deletions
@@ -276,8 +276,6 @@ class FinancialReports
$pd = $period_agg[$code]['debit'] ?? 0.0;
$pc = $period_agg[$code]['credit'] ?? 0.0;
if ($od == 0 && $oc == 0 && $pd == 0 && $pc == 0) continue;
$opening_balance = $od - $oc;
$closing_balance = $opening_balance + $pd - $pc;
@@ -344,8 +342,6 @@ class FinancialReports
$d = $agg[$code]['debit'] ?? 0.0;
$c = $agg[$code]['credit'] ?? 0.0;
if ($d == 0 && $c == 0) continue;
$a['total_debit'] = $d;
$a['total_credit'] = $c;
$rows[] = $a;
@@ -396,7 +392,6 @@ class FinancialReports
$c = $agg[$code]['credit'] ?? 0.0;
if (in_array($a['account_type'], ['asset', 'liability', 'equity'])) {
if ($d == 0 && $c == 0) continue;
$a['total_debit'] = $d;
$a['total_credit'] = $c;
$rows[] = $a;