minor fix

This commit is contained in:
Wilson Gomez 2023-10-12 13:49:45 -05:00
parent 50739286d6
commit 144e1fada1
1 changed files with 3 additions and 2 deletions

View File

@ -2315,9 +2315,10 @@ class AppWindow(FrontWindow):
for ln in lines:
res['untaxed_amount'] += ln['amount']
res['total_amount'] += ln['amount_w_tax']
tip_amount = sale.get('tip_amount', 0) or 0
delivery_amount = sale.get('delivery_amount', 0) or 0
res['tax_amount'] = res['total_amount'] - res['untaxed_amount']
res['net_amount'] = res['total_amount'] + sale.get('tip_amount', 0) + sale.get('delivery_amount', 0)
res['net_amount'] = res['total_amount'] + tip_amount + delivery_amount
else:
res = self.Sale.get_amounts({'sale_id': self.sale_id})
self.store.set(res)