Fix: Rounding error prevented some bills from getting settled. This is related to the half even rounding in python.
This commit is contained in:
parent
ca3a599386
commit
e0ef5e7b64
@ -326,7 +326,11 @@ export class BillService {
|
||||
(t, k) =>
|
||||
k.inventories.reduce(
|
||||
(a, c) =>
|
||||
a + (c.isHappyHour ? 0 : c.price) * c.quantity * (1 - c.discount) * (1 + c.taxRate),
|
||||
a +
|
||||
this.math.halfRoundEven(
|
||||
(c.isHappyHour ? 0 : c.price) * c.quantity * (1 - c.discount) * (1 + c.taxRate),
|
||||
2,
|
||||
),
|
||||
0,
|
||||
) + t,
|
||||
0,
|
||||
|
Loading…
Reference in New Issue
Block a user