mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-14 06:57:35 +08:00
skip calculating exchange rates when the account balance is 0
This commit is contained in:
@@ -107,6 +107,10 @@ export const useExchangeRatesStore = defineStore('exchangeRates', {
|
||||
});
|
||||
},
|
||||
getExchangedAmount(amount, fromCurrency, toCurrency) {
|
||||
if (amount === 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!this.latestExchangeRates || !this.latestExchangeRates.data || !this.latestExchangeRates.data.exchangeRates) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user