Skip to content

Commit

Permalink
auto set destination amount by source amount when destination amount …
Browse files Browse the repository at this point in the history
…is zero
  • Loading branch information
mayswind committed Mar 10, 2024
1 parent 6b42925 commit 2916106
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/stores/transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2916106

Please sign in to comment.