1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Refactor for payment processing

This commit is contained in:
David Bomba 2024-02-17 19:08:20 +11:00
parent 97accc8142
commit 6974841921

View File

@ -279,7 +279,6 @@ class AutoBillInvoice extends AbstractService
$this->is_partial_amount = true;
}
$payment_repo = new PaymentRepository(new CreditRepository());
foreach ($unapplied_payments as $key => $payment) {
@ -312,6 +311,10 @@ class AutoBillInvoice extends AbstractService
}
$this->invoice = $this->invoice->fresh();
if((int)$this->invoice->balance == 0) {
return $this;
}
}
return $this;