Merge branch 'v5-develop' of https://github.com/turbo124/invoiceninja into v5-develop

This commit is contained in:
David Bomba 2025-03-11 06:51:55 +11:00
commit 2dfb6ee44d
2 changed files with 6 additions and 4 deletions

View File

@ -280,7 +280,7 @@ class BankIntegrationController extends BaseController
$account = $nordigen->getAccount($bank_integration->nordigen_account_id);
if(is_array($account) && !in_array($account['account_status'], ['READY', 'PROCESSING','DISCOVERED'])) {
if(is_array($account) && isset($account['account_status']) &&!in_array($account['account_status'], ['READY', 'PROCESSING','DISCOVERED'])) {
$bank_integration->disabled_upstream = true;
$bank_integration->save();

View File

@ -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;
}