mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for invoice paid to date calculations on refund
This commit is contained in:
parent
151cc07560
commit
5a31634f81
@ -242,6 +242,7 @@ class RefundPayment
|
||||
|
||||
$invoice->service()->updateBalance($refunded_invoice['amount'])->save();
|
||||
$invoice->ledger()->updateInvoiceBalance($refunded_invoice['amount'], "Refund of payment # {$this->payment->number}")->save();
|
||||
$invoice->paid_to_date -= $refunded_invoice['amount'];
|
||||
|
||||
if ($invoice->amount == $invoice->balance) {
|
||||
$invoice->service()->setStatus(Invoice::STATUS_SENT);
|
||||
|
Loading…
x
Reference in New Issue
Block a user