Delete contact check all contact type
This commit is contained in:
		| @@ -3,9 +3,12 @@ | |||||||
| namespace App\Jobs\Common; | namespace App\Jobs\Common; | ||||||
|  |  | ||||||
| use App\Abstracts\Job; | use App\Abstracts\Job; | ||||||
|  | use App\Traits\Contacts; | ||||||
|  |  | ||||||
| class DeleteContact extends Job | class DeleteContact extends Job | ||||||
| { | { | ||||||
|  |     use Contacts; | ||||||
|  |  | ||||||
|     protected $contact; |     protected $contact; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @@ -52,7 +55,7 @@ class DeleteContact extends Job | |||||||
|             'transactions' => 'transactions', |             'transactions' => 'transactions', | ||||||
|         ]; |         ]; | ||||||
|  |  | ||||||
|         if ($this->contact->type == 'customer') { |         if (in_array($this->contact->type, $this->getCustomerTypes())) { | ||||||
|             $rels['invoices'] = 'invoices'; |             $rels['invoices'] = 'invoices'; | ||||||
|         } else { |         } else { | ||||||
|             $rels['bills'] = 'bills'; |             $rels['bills'] = 'bills'; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user