mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-17 16:24:25 +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:
@@ -2187,9 +2187,9 @@ export function useI18n() {
|
||||
}
|
||||
|
||||
if (accountsBalance[i].isAsset) {
|
||||
totalBalance += Math.floor(balance);
|
||||
totalBalance += Math.trunc(balance);
|
||||
} else if (accountsBalance[i].isLiability) {
|
||||
totalBalance -= Math.floor(balance);
|
||||
totalBalance -= Math.trunc(balance);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user