From 6aa03e5796ba46cd31e4eae7fb615fbd122766b0 Mon Sep 17 00:00:00 2001 From: MaysWind Date: Fri, 11 Dec 2020 00:52:47 +0800 Subject: [PATCH] fix cannot save new account when switch to multi account type after setting account balance --- src/views/mobile/accounts/Edit.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/mobile/accounts/Edit.vue b/src/views/mobile/accounts/Edit.vue index b6a208f8..e803068a 100644 --- a/src/views/mobile/accounts/Edit.vue +++ b/src/views/mobile/accounts/Edit.vue @@ -497,7 +497,7 @@ export default { icon: self.account.icon, color: self.account.color, currency: self.account.type === self.$constants.account.allAccountTypes.SingleAccount.toString() ? self.account.currency : self.$constants.currency.parentAccountCurrencyPlaceholder, - balance: self.account.balance, + balance: self.account.type === self.$constants.account.allAccountTypes.SingleAccount.toString() ? self.account.balance : 0, comment: self.account.comment, subAccounts: self.account.type === self.$constants.account.allAccountTypes.SingleAccount.toString() ? null : subAccounts, };