add refund logic and fix books inventory logic
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user