close #2627 Enhancement: Invoice viewed mail send several times ( #8669hjurd )
This commit is contained in:
parent
2101a5d95a
commit
40b48b2f90
@ -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'])) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user