Fix summary calculations
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user