mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Ensure zero balance invoices are marked as Paid
This commit is contained in:
parent
3ebb576be7
commit
4af4f2a2a8
@ -299,7 +299,10 @@ class InvoiceService
|
||||
if($this->invoice->status_id == Invoice::STATUS_DRAFT)
|
||||
return $this;
|
||||
|
||||
if ($this->invoice->balance > 0 && $this->invoice->balance < $this->invoice->amount) {
|
||||
if($this->invoice->balance == 0){
|
||||
$this->setStatus(Invoice::STATUS_PAID);
|
||||
}
|
||||
elseif ($this->invoice->balance > 0 && $this->invoice->balance < $this->invoice->amount) {
|
||||
$this->setStatus(Invoice::STATUS_PARTIAL);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user