mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-11-19 07:08:54 +01:00
fix: rounding erros when summing transactions
This commit is contained in:
1 parent
52a0279fc8
commit
cb2de69ec2
1 file changed
+1
-1
@@ -61,7 +61,7 @@ _="on change from #transactions-list or htmx:afterSettle
|
||||
for amt in <.transaction:has(input[name='transactions']:checked) .main-amount .amount/>
|
||||
set amountValue to parseFloat(amt.getAttribute('data-amount'))
|
||||
if not isNaN(amountValue)
|
||||
set total to (total * 100) + (amountValue * 100)
|
||||
set total to total + (amountValue * 100)
|
||||
end
|
||||
end
|
||||
set total to total / 100
|
||||
|
||||
Reference in new issue
Block a user