From 47eabf5434461381de405330aedacd4cff5fe84c Mon Sep 17 00:00:00 2001 From: David Bomba Date: Fri, 5 Feb 2021 16:03:34 +1100 Subject: [PATCH] Invoice Actions --- app/Services/Invoice/InvoiceService.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Services/Invoice/InvoiceService.php b/app/Services/Invoice/InvoiceService.php index 543d034feab0..b45e5eb19b6e 100644 --- a/app/Services/Invoice/InvoiceService.php +++ b/app/Services/Invoice/InvoiceService.php @@ -12,6 +12,7 @@ namespace App\Services\Invoice; use App\Jobs\Entity\CreateEntityPdf; +use App\Jobs\Invoice\InvoiceWorkflowSettings; use App\Jobs\Util\UnlinkFile; use App\Models\CompanyGateway; use App\Models\Expense; @@ -239,6 +240,9 @@ class InvoiceService public function updateStatus() { if ((int)$this->invoice->balance == 0) { + + InvoiceWorkflowSettings::dispatch($this->invoice); + $this->setStatus(Invoice::STATUS_PAID); }