updated contact type determination in method

This commit is contained in:
Cihan Şentürk 2026-03-14 00:54:16 +03:00
parent 3ad75c4d6b
commit 09b4e1641e
1 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ trait Import
event(new ImportViewCreated($import)); event(new ImportViewCreated($import));
return [ return [
$import->view, $import->view,
$import->data $import->data
]; ];
} }
@ -103,7 +103,7 @@ trait Import
{ {
$id = isset($row['contact_id']) ? $row['contact_id'] : null; $id = isset($row['contact_id']) ? $row['contact_id'] : null;
$type = !empty($type) ? $type : (!empty($row['type']) ? (($row['type'] == Transaction::INCOME_TYPE) ? 'customer' : 'vendor') : 'customer'); $type = !empty($type) ? $type : (!empty($row['type']) ? (($row['type'] == Transaction::INCOME_TYPE) ? Contact::CUSTOMER_TYPE : Contact::VENDOR_TYPE) : Contact::CUSTOMER_TYPE);
if (empty($row['contact_id']) && !empty($row['contact_email'])) { if (empty($row['contact_id']) && !empty($row['contact_email'])) {
$id = $this->getContactIdFromEmail($row, $type); $id = $this->getContactIdFromEmail($row, $type);