mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-16 07:57:33 +08:00
use truncation instead of rounding down or rounding to the nearest value when numerical calculations exceed precision limits
This commit is contained in:
@@ -196,7 +196,7 @@ export function useTransactionEditPageBase(type: TransactionEditPageType, initMo
|
||||
return amountName;
|
||||
}
|
||||
|
||||
amountInDefaultCurrency = Math.floor(amountInDefaultCurrency);
|
||||
amountInDefaultCurrency = Math.trunc(amountInDefaultCurrency);
|
||||
|
||||
const displayAmountInDefaultCurrency = getDisplayAmount(amountInDefaultCurrency, transaction.value.hideAmount, defaultCurrency.value);
|
||||
return amountName + ` (${displayAmountInDefaultCurrency})`;
|
||||
|
||||
Reference in New Issue
Block a user