From 4d59bdf754b113b9a8b2d3ee0d958f5ed4133b00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cihan=20=C5=9Eent=C3=BCrk?= <53110792+CihanSenturk@users.noreply.github.com> Date: Sun, 7 Dec 2025 19:31:45 +0300 Subject: [PATCH] fixed import transaction type issue --- app/Imports/Banking/Transactions.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Imports/Banking/Transactions.php b/app/Imports/Banking/Transactions.php index 2fb623764..ce0b9f5dd 100644 --- a/app/Imports/Banking/Transactions.php +++ b/app/Imports/Banking/Transactions.php @@ -32,6 +32,10 @@ class Transactions extends Import { $row = parent::map($row); + if (!isset($row['type'])) { + return []; + } + $real_type = $this->getRealTypeTransaction($row['type']); $contact_type = config('type.transaction.' . $real_type . '.contact_type', $real_type == 'income' ? 'customer' : 'vendor'); @@ -49,6 +53,7 @@ class Transactions extends Import public function prepareRules($rules): array { $rules['number'] = 'required|string'; + $rules['type'] = 'required|string'; //$rules['currency_rate'] = 'required|gt:0'; return $rules;