Delete contact check all contact type

This commit is contained in:
Cüneyt Şentürk 2020-01-22 21:23:20 +03:00
parent c208c336eb
commit f60b34d668

View File

@ -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';