close #2627 Enhancement: Invoice viewed mail send several times ( #8669hjurd )

This commit is contained in:
Cüneyt Şentürk 2023-03-16 12:13:13 +03:00
parent 2101a5d95a
commit 40b48b2f90

View File

@ -18,6 +18,14 @@ class SendDocumentViewNotification
public function handle(Event $event)
{
$document = $event->document;
if (in_array($documet->status, [
'viewed', 'approved', 'received', 'refused', 'partial', 'paid',
'cancelled', 'voided', 'completed', 'refunded',
])) {
return;
}
$config = config('type.document.' . $document->type . '.notification');
if (empty($config) || empty($config['class'])) {