Fixed header discount value

This commit is contained in:
Abdul Aziz Amrullah 2026-06-08 14:01:16 +07:00
parent e63c5ca018
commit d49700e18a

View File

@ -95,7 +95,7 @@ class PosExportBcWizard(models.TransientModel):
invoice = order.pos_reference or order.name
subtotal = sum(l.price_subtotal for l in order.lines)
discount_order = 0.0 # Standard Odoo doesn't have an order level discount easily isolated from line discounts
discount_order = sum(abs(l.price_subtotal) for l in order.lines if l.price_unit < 0)
tax = order.amount_tax
charge = order.amount_total
# In Odoo, payment amount can be negative for change.