mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-20 01:34:24 +08:00
support using duplicate checker to prevent duplicate submissions for new transaction record
This commit is contained in:
@@ -745,7 +745,7 @@ export const useTransactionsStore = defineStore('transactions', {
|
||||
});
|
||||
});
|
||||
},
|
||||
saveTransaction({ transaction, defaultCurrency, isEdit }) {
|
||||
saveTransaction({ transaction, defaultCurrency, isEdit, clientSessionId }) {
|
||||
const self = this;
|
||||
const settingsStore = useSettingsStore();
|
||||
const exchangeRatesStore = useExchangeRatesStore();
|
||||
@@ -764,6 +764,10 @@ export const useTransactionsStore = defineStore('transactions', {
|
||||
utcOffset: transaction.utcOffset
|
||||
};
|
||||
|
||||
if (clientSessionId) {
|
||||
submitTransaction.clientSessionId = clientSessionId;
|
||||
}
|
||||
|
||||
if (transaction.type === transactionConstants.allTransactionTypes.Expense) {
|
||||
submitTransaction.categoryId = transaction.expenseCategory;
|
||||
} else if (transaction.type === transactionConstants.allTransactionTypes.Income) {
|
||||
|
||||
Reference in New Issue
Block a user