mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 12:33:56 +00:00
update debtors import
This commit is contained in:
@@ -21,17 +21,15 @@ class ImportsDebtor implements ToModel, WithHeadingRow, WithBatchInserts, WithVa
|
||||
$reference = preg_split('(-|\(|\)|\/)', $row['2nd_description']);
|
||||
$reference = $reference[array_key_last($reference)];
|
||||
$debtor = $row['code'];
|
||||
$company = Company::where('reference', $reference)->first();
|
||||
$company = Company::where('reference', 'LIKE', '%'.$reference.'%')->first();
|
||||
if (!$company) {
|
||||
echo $reference.'<br>';
|
||||
// $company->debtor = $debtor;
|
||||
// $company->update();
|
||||
}
|
||||
|
||||
return [];
|
||||
} catch (\Exception $exception){
|
||||
dump($exception);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user