add refund logic and fix books inventory logic
Deploy to Shared Hosting / Shared hosting deploy (push) Failing after 47s
Tests / PHPUnit (push) Failing after 1m20s

This commit is contained in:
root
2026-08-22 13:44:25 -04:00
parent 23d1cbb64c
commit d906a915d6
45 changed files with 4711 additions and 442 deletions
+1 -1
View File
@@ -104,7 +104,7 @@ class InvoiceLedgerService
}
$netChargeCents = $totalAmountCents - $discountCents;
$rawBalanceCents = $netChargeCents - $paidCents - $refundPaidCents;
$rawBalanceCents = $netChargeCents - $paidCents + $refundPaidCents;
$balanceCents = max(0, $rawBalanceCents);
$customerCreditCents = max(0, $paidCents - $refundPaidCents - $netChargeCents);