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