Exclude cancelled transaction
This commit is contained in:
parent
1245444819
commit
eda9896548
@ -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)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user