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)