From fe5202bd7505669fd731c5a33aff00dbdbea0def Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cihan=20=C5=9Eent=C3=BCrk?= <53110792+CihanSenturk@users.noreply.github.com> Date: Thu, 11 Jul 2024 12:07:17 +0300 Subject: [PATCH] fixed bulk actions edit transaction issue --- app/BulkActions/Banking/Transactions.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/BulkActions/Banking/Transactions.php b/app/BulkActions/Banking/Transactions.php index 5d8acb344..07c5b129d 100644 --- a/app/BulkActions/Banking/Transactions.php +++ b/app/BulkActions/Banking/Transactions.php @@ -65,7 +65,21 @@ class Transactions extends BulkAction $types[] = $r_type; $real_type = $r_type; + $contact_type = $transaction->contact->type; + + if (! $contact_type) { + if ($real_type == Transaction::INCOME_TYPE + || $real_type == Transaction::INCOME_TRANSFER_TYPE + || $real_type == Transaction::INCOME_SPLIT_TYPE + || $real_type == Transaction::INCOME_RECURRING_TYPE + ) { + $contact_type = 'customer'; + } else { + $contact_type = 'vendor'; + } + } + $account_currency_code = $transaction->account->currency_code; }