From 2916106f2734519c2873ae45b60ae5671c3cd2d6 Mon Sep 17 00:00:00 2001 From: MaysWind Date: Sun, 10 Mar 2024 19:55:29 +0800 Subject: [PATCH] auto set destination amount by source amount when destination amount is zero --- src/stores/transaction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stores/transaction.js b/src/stores/transaction.js index 5e53eece..bd6aba6f 100644 --- a/src/stores/transaction.js +++ b/src/stores/transaction.js @@ -352,7 +352,7 @@ export const useTransactionsStore = defineStore('transactions', { } } - if ((!sourceAccount || !destinationAccount || transaction.destinationAmount === oldValue) && + if ((!sourceAccount || !destinationAccount || transaction.destinationAmount === oldValue || transaction.destinationAmount === 0) && (stringCurrencyToNumeric(transactionConstants.minAmount) <= newValue && newValue <= stringCurrencyToNumeric(transactionConstants.maxAmount))) { transaction.destinationAmount = newValue;