credit card account supports statement date

This commit is contained in:
MaysWind
2024-12-10 22:41:06 +08:00
parent 50c774fd78
commit 62e09190f3
13 changed files with 292 additions and 67 deletions
+11 -1
View File
@@ -258,7 +258,7 @@ export const useAccountsStore = defineStore('accounts', {
const now = getCurrentUnixTime();
return {
category: 1,
category: accountConstants.cashCategoryType,
type: accountConstants.allAccountTypes.SingleAccount,
name: '',
icon: iconConstants.defaultAccountIconId,
@@ -267,6 +267,7 @@ export const useAccountsStore = defineStore('accounts', {
balance: 0,
balanceTime: now,
comment: '',
creditCardStatementDate: 0,
visible: true
};
},
@@ -284,6 +285,7 @@ export const useAccountsStore = defineStore('accounts', {
balance: 0,
balanceTime: now,
comment: '',
creditCardStatementDate: parentAccount.creditCardStatementDate,
visible: true
};
},
@@ -760,6 +762,10 @@ export const useAccountsStore = defineStore('accounts', {
comment: subAccount.comment
};
if (account.category === accountConstants.creditCardCategoryType) {
submitAccount.creditCardStatementDate = subAccount.creditCardStatementDate;
}
if (isEdit) {
submitAccount.id = subAccount.id;
submitAccount.hidden = !subAccount.visible;
@@ -783,6 +789,10 @@ export const useAccountsStore = defineStore('accounts', {
subAccounts: account.type === accountConstants.allAccountTypes.SingleAccount ? null : submitSubAccounts,
};
if (account.category === accountConstants.creditCardCategoryType) {
submitAccount.creditCardStatementDate = account.creditCardStatementDate;
}
if (clientSessionId) {
submitAccount.clientSessionId = clientSessionId;
}