mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-20 01:34:24 +08:00
auto set destination amount by source amount when destination amount is zero
This commit is contained in:
@@ -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 &&
|
(stringCurrencyToNumeric(transactionConstants.minAmount) <= newValue &&
|
||||||
newValue <= stringCurrencyToNumeric(transactionConstants.maxAmount))) {
|
newValue <= stringCurrencyToNumeric(transactionConstants.maxAmount))) {
|
||||||
transaction.destinationAmount = newValue;
|
transaction.destinationAmount = newValue;
|
||||||
|
|||||||
Reference in New Issue
Block a user