From 7ee23e43ec9b0ca0611b1e7fdf646c7d8013b16d Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 11 Mar 2025 06:01:17 +1100 Subject: [PATCH] fixes for checks on currency id --- app/Http/Requests/Client/UpdateClientRequest.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/Http/Requests/Client/UpdateClientRequest.php b/app/Http/Requests/Client/UpdateClientRequest.php index bb94bd661d..a3497ac7ad 100644 --- a/app/Http/Requests/Client/UpdateClientRequest.php +++ b/app/Http/Requests/Client/UpdateClientRequest.php @@ -106,9 +106,11 @@ class UpdateClientRequest extends Request $user = auth()->user(); /* If the user removes the currency we must always set the default */ - if (array_key_exists('settings', $input) && ! array_key_exists('currency_id', $input['settings'])) { - $input['settings']['currency_id'] = (string) $user->company()->settings->currency_id; - } elseif (empty($input['settings']['currency_id']) ?? true) { + // if (array_key_exists('settings', $input) && ! array_key_exists('currency_id', $input['settings'])) { + // $input['settings']['currency_id'] = (string) $user->company()->settings->currency_id; + // } else //2025-03-11 fixes for currency_id not being set + + if (empty($input['settings']['currency_id'])) { $input['settings']['currency_id'] = (string) $user->company()->settings->currency_id; }