support setting the time of the initial balance when creating a new account

This commit is contained in:
MaysWind
2024-11-11 01:27:44 +08:00
parent 06b4960984
commit bff6ca7e9d
10 changed files with 130 additions and 10 deletions
+1
View File
@@ -10,6 +10,7 @@ export function setAccountModelByAnotherAccount(account, account2) {
account.color = account2.color;
account.currency = account2.currency;
account.balance = account2.balance;
account.balanceTime = account2.balanceTime;
account.comment = account2.comment;
account.visible = !account2.hidden;
}
+2 -1
View File
@@ -255,7 +255,7 @@ export default {
getAccount: ({ id }) => {
return axios.get('v1/accounts/get.json?id=' + id);
},
addAccount: ({ category, type, name, icon, color, currency, balance, comment, subAccounts, clientSessionId }) => {
addAccount: ({ category, type, name, icon, color, currency, balance, balanceTime, comment, subAccounts, clientSessionId }) => {
return axios.post('v1/accounts/add.json', {
category,
type,
@@ -264,6 +264,7 @@ export default {
color,
currency,
balance,
balanceTime,
comment,
subAccounts,
clientSessionId