From 5b832177afb8dfb44642ce13e4a0d109fcb426ff Mon Sep 17 00:00:00 2001 From: omair saleh Date: Wed, 6 Apr 2022 10:40:04 +0800 Subject: [PATCH] fix debtors import --- app/Classes/Modules/Imports/Services/ImportsDebtor.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Classes/Modules/Imports/Services/ImportsDebtor.php b/app/Classes/Modules/Imports/Services/ImportsDebtor.php index b97aa263..5e0bdadc 100644 --- a/app/Classes/Modules/Imports/Services/ImportsDebtor.php +++ b/app/Classes/Modules/Imports/Services/ImportsDebtor.php @@ -18,7 +18,7 @@ class ImportsDebtor implements ToModel, WithHeadingRow, WithBatchInserts, WithVa public function model($row = []) { try { - preg_match_all('/([0-9]{3,4}[a-zA-Z]{3,4})/', $row['2nd_description'], $matches); + preg_match_all('/([0-9]{3,4}[a-zA-Z]{3,4})/', $row['desc2'], $matches); foreach ($matches[0] as $match){ $reference = $match; @@ -32,7 +32,9 @@ class ImportsDebtor implements ToModel, WithHeadingRow, WithBatchInserts, WithVa } - } catch (\Exception $exception){} + } catch (\Exception $exception){ + dd($exception); + } } public function batchSize(): int