This commit is contained in:
James Cole
2025-02-09 05:26:37 +01:00
parent f9bcc4b1fa
commit edab602bb7
7 changed files with 255 additions and 202 deletions

View File

@@ -922,6 +922,12 @@ export default {
allowed_types: this.transactions[index].source_account.allowed_types,
default_allowed_types: ['Asset account', 'Revenue account', 'Loan', 'Debt', 'Mortgage']
};
if(model.hasOwnProperty('account_currency_id') && null !== model.account_currency_id) {
this.transactions[index].source_account.currency_id = model.account_currency_id;
this.transactions[index].source_account.currency_name = model.account_currency_name;
this.transactions[index].source_account.currency_code = model.account_currency_code;
this.transactions[index].source_account.currency_decimal_places = model.account_currency_decimal_places;
}
// force types on destination selector.
this.transactions[index].destination_account.allowed_types = window.allowedOpposingTypes.source[model.type];
@@ -946,6 +952,12 @@ export default {
allowed_types: this.transactions[index].destination_account.allowed_types,
default_allowed_types: ['Asset account', 'Expense account', 'Loan', 'Debt', 'Mortgage']
};
if(model.hasOwnProperty('account_currency_id') && null !== model.account_currency_id) {
this.transactions[index].destination_account.currency_id = model.account_currency_id;
this.transactions[index].destination_account.currency_name = model.account_currency_name;
this.transactions[index].destination_account.currency_code = model.account_currency_code;
this.transactions[index].destination_account.currency_decimal_places = model.account_currency_decimal_places;
}
// force types on destination selector.
this.transactions[index].source_account.allowed_types = window.allowedOpposingTypes.destination[model.type];