mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-25 13:10:35 +00:00
Merge branch 'develop' into 5.8-dev
# Conflicts: # composer.lock # config/firefly.php # public/v1/js/create_transaction.js # public/v1/js/edit_transaction.js # public/v1/js/profile.js # resources/assets/js/locales/pt-br.json # resources/lang/pt_BR/firefly.php # yarn.lock
This commit is contained in:
@@ -115,6 +115,16 @@ trait AccountServiceTrait
|
||||
$fields = $this->validAssetFields;
|
||||
}
|
||||
|
||||
// remove currency_id if necessary.
|
||||
$type = $account->accountType->type;
|
||||
$list = config('firefly.valid_currency_account_types');
|
||||
if(!in_array($type, $list, true)) {
|
||||
$pos = array_search('currency_id', $fields);
|
||||
if ($pos !== false) {
|
||||
unset($fields[$pos]);
|
||||
}
|
||||
}
|
||||
|
||||
// the account role may not be set in the data but we may have it already:
|
||||
if (!array_key_exists('account_role', $data)) {
|
||||
$data['account_role'] = null;
|
||||
|
||||
Reference in New Issue
Block a user