From 1f0b9e93337a45f3a6e15b367ef57091e75b657f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Wed, 27 Oct 2021 11:21:04 +0300 Subject: [PATCH] don't send email when invoice is marked as paid --- app/Listeners/Document/SendDocumentPaymentNotification.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Listeners/Document/SendDocumentPaymentNotification.php b/app/Listeners/Document/SendDocumentPaymentNotification.php index e61b80bbe..e144dbed5 100644 --- a/app/Listeners/Document/SendDocumentPaymentNotification.php +++ b/app/Listeners/Document/SendDocumentPaymentNotification.php @@ -19,6 +19,10 @@ class SendDocumentPaymentNotification return; } + if (!empty($event->request['mark_paid'])) { + return; + } + $document = $event->document; $transaction = $document->transactions()->latest()->first();