Fix summary calculations

This commit is contained in:
2026-03-23 20:06:00 +01:00
parent 81d28b5ee6
commit d6f3e19215

View File

@@ -193,9 +193,9 @@ impl PreparedCustomer {
.map(|p| p.amount.parse::<f64>().unwrap())
.sum();
let rounded_grand_total = grand_total.round();
let avrundningsfel = grand_total - rounded_grand_total;
let oresutjamning = total_from_transactions - rounded_grand_total;
let avrundningsfel = total_from_transactions - grand_total;
let rounded_grand_total = total_from_transactions.round();
let oresutjamning = rounded_grand_total - grand_total - avrundningsfel;
let summary = Summary {
total_volume: fmt(total_volume),