Fix: If there were products with differing discounts in the final bill, the printed bill would show the wrong amount when it summed up the products. It would apply the discount rate of the first instance of the product too all of it.
This commit is contained in:
@ -40,6 +40,7 @@ def print_bill(voucher_id: uuid.UUID, db: Session):
|
||||
key = (
|
||||
i.product_id,
|
||||
i.is_happy_hour,
|
||||
i.discount,
|
||||
frozenset(m.modifier_id for m in i.modifiers if m.modifier.show_in_bill),
|
||||
)
|
||||
if key in items_dict:
|
||||
|
||||
Reference in New Issue
Block a user