From 1ad532c033022f535032ddff77ce4e6f489986e0 Mon Sep 17 00:00:00 2001 From: sinergia Date: Mon, 4 Mar 2024 13:17:35 -0500 Subject: [PATCH] fix: UPDATE on_change_lines --- sale.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sale.py b/sale.py index 03f31f8..0bf9ff4 100644 --- a/sale.py +++ b/sale.py @@ -47,6 +47,7 @@ class Sale(metaclass=PoolMeta): self.tax_amount = Decimal('0.0') self.total_amount = Decimal('0.0') self.total_discount = Decimal('0.0') + self.total_tip = Decimal('0.0') if self.lines: for line in self.lines: @@ -57,6 +58,7 @@ class Sale(metaclass=PoolMeta): self.tax_amount = self.currency.round(self.tax_amount) self.total_amount = self.untaxed_amount + self.tax_amount if self.currency: + self.total_tip = self.currency.round(self.total_tip) self.total_discount = self.currency.round(self.total_discount) self.total_amount = self.currency.round(self.total_amount)