fixes for checks on currency id
This commit is contained in:
parent
00eb24b3a2
commit
7ee23e43ec
|
|
@ -106,9 +106,11 @@ class UpdateClientRequest extends Request
|
||||||
$user = auth()->user();
|
$user = auth()->user();
|
||||||
|
|
||||||
/* If the user removes the currency we must always set the default */
|
/* 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'])) {
|
// if (array_key_exists('settings', $input) && ! array_key_exists('currency_id', $input['settings'])) {
|
||||||
$input['settings']['currency_id'] = (string) $user->company()->settings->currency_id;
|
// $input['settings']['currency_id'] = (string) $user->company()->settings->currency_id;
|
||||||
} elseif (empty($input['settings']['currency_id']) ?? true) {
|
// } 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;
|
$input['settings']['currency_id'] = (string) $user->company()->settings->currency_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue