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;
use App\Abstracts\Job;
use App\Traits\Contacts;
class DeleteContact extends Job
{
use Contacts;
protected $contact;
/**
@ -52,7 +55,7 @@ class DeleteContact extends Job
'transactions' => 'transactions',
];
if ($this->contact->type == 'customer') {
if (in_array($this->contact->type, $this->getCustomerTypes())) {
$rels['invoices'] = 'invoices';
} else {
$rels['bills'] = 'bills';