From eda9896548731eb72dfd68c82e518c7594c7683c Mon Sep 17 00:00:00 2001 From: Abdul Aziz Amrullah Date: Wed, 10 Jun 2026 09:52:37 +0700 Subject: [PATCH] Exclude cancelled transaction --- wizard/pos_export_bc_wizard.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wizard/pos_export_bc_wizard.py b/wizard/pos_export_bc_wizard.py index dee6c5f..bada70b 100644 --- a/wizard/pos_export_bc_wizard.py +++ b/wizard/pos_export_bc_wizard.py @@ -102,6 +102,8 @@ class PosExportBcWizard(models.TransientModel): # To get the total amount tendered before change, we sum only the positive payments. # The change/return is typically stored in order.amount_return paid = sum(p.amount for p in order.payment_ids if p.amount > 0) + if paid == 0: + continue pax = order.customer_count if 'customer_count' in order._fields else 1 return_amt = order.amount_return if 'amount_return' in order._fields else (paid - charge if paid > charge else 0)