fix: Summing exchanged transactions sums both amount and the exchanged amount

This commit is contained in:
Herculino Trotta
2024-11-11 00:35:09 -03:00
parent d4a3117702
commit eab04ad298
2 changed files with 17 additions and 13 deletions
@@ -58,7 +58,7 @@ _="on change from #transactions-list or htmx:afterSettle
<div class="vr mx-3 tw-align-middle"></div>
<span _="on selected_transactions_updated from #actions-bar
set total to 0.0
for amt in <.transaction:has(input[name='transactions']:checked) .amount/>
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 + amountValue