Ensure zero balance invoices are marked as Paid
This commit is contained in:
parent
3ebb576be7
commit
4af4f2a2a8
1 changed files with 4 additions and 1 deletions
|
|
@ -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…
Add table
Reference in a new issue