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:
parent
97accc8142
commit
6974841921
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user