Fix summary calculations
This commit is contained in:
@@ -193,9 +193,9 @@ impl PreparedCustomer {
|
|||||||
.map(|p| p.amount.parse::<f64>().unwrap())
|
.map(|p| p.amount.parse::<f64>().unwrap())
|
||||||
.sum();
|
.sum();
|
||||||
|
|
||||||
let rounded_grand_total = grand_total.round();
|
let avrundningsfel = total_from_transactions - grand_total;
|
||||||
let avrundningsfel = grand_total - rounded_grand_total;
|
let rounded_grand_total = total_from_transactions.round();
|
||||||
let oresutjamning = total_from_transactions - rounded_grand_total;
|
let oresutjamning = rounded_grand_total - grand_total - avrundningsfel;
|
||||||
|
|
||||||
let summary = Summary {
|
let summary = Summary {
|
||||||
total_volume: fmt(total_volume),
|
total_volume: fmt(total_volume),
|
||||||
|
|||||||
Reference in New Issue
Block a user