From 0892b6035fbd54b07b7d4a34a1fb2883abaea86a Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 12 Oct 2022 13:39:08 +1100 Subject: [PATCH] handle invoices going from zero balance to positive balance --- app/Services/Invoice/InvoiceService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/Invoice/InvoiceService.php b/app/Services/Invoice/InvoiceService.php index 3e1d220ae4e4..bb76f66b62ef 100644 --- a/app/Services/Invoice/InvoiceService.php +++ b/app/Services/Invoice/InvoiceService.php @@ -313,7 +313,7 @@ class InvoiceService } elseif ($this->invoice->balance > 0 && $this->invoice->balance < $this->invoice->amount) { $this->invoice->status_id = Invoice::STATUS_PARTIAL; } - elseif ($this->invoice->balance < 0) { + elseif ($this->invoice->balance > 0) { $this->invoice->status_id = Invoice::STATUS_SENT; }