diff --git a/app/Classes/Modules/Imports/Services/ImportsBankRecord.php b/app/Classes/Modules/Imports/Services/ImportsBankRecord.php index bf88fccc..7ddb4875 100644 --- a/app/Classes/Modules/Imports/Services/ImportsBankRecord.php +++ b/app/Classes/Modules/Imports/Services/ImportsBankRecord.php @@ -24,6 +24,7 @@ class ImportsBankRecord implements ToModel, WithHeadingRow, WithBatchInserts, Wi { $date = Date::excelToDateTimeObject($row['date']); $credit = (float) $row['credit']; + $systemReference = null; $transaction = Transaction::whereIn('status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED]) ->where('type', TransactionType::PAYMENT)->where('owner_type', Booking::class) @@ -31,13 +32,25 @@ class ImportsBankRecord implements ToModel, WithHeadingRow, WithBatchInserts, Wi ->where('amount', '>=', $credit)->where('amount', '<', ($credit + 0.01)) ->get(); - if(!count($transaction)) return; + if(count($transaction)) { + $systemReference = $transaction->pluck('owner.marking')->flatten()->implode(', '); + } + + + echo '