fix: UPDATE on_change_lines
This commit is contained in:
parent
57f95f0b7d
commit
1ad532c033
2
sale.py
2
sale.py
@ -47,6 +47,7 @@ class Sale(metaclass=PoolMeta):
|
|||||||
self.tax_amount = Decimal('0.0')
|
self.tax_amount = Decimal('0.0')
|
||||||
self.total_amount = Decimal('0.0')
|
self.total_amount = Decimal('0.0')
|
||||||
self.total_discount = Decimal('0.0')
|
self.total_discount = Decimal('0.0')
|
||||||
|
self.total_tip = Decimal('0.0')
|
||||||
|
|
||||||
if self.lines:
|
if self.lines:
|
||||||
for line in 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.tax_amount = self.currency.round(self.tax_amount)
|
||||||
self.total_amount = self.untaxed_amount + self.tax_amount
|
self.total_amount = self.untaxed_amount + self.tax_amount
|
||||||
if self.currency:
|
if self.currency:
|
||||||
|
self.total_tip = self.currency.round(self.total_tip)
|
||||||
self.total_discount = self.currency.round(self.total_discount)
|
self.total_discount = self.currency.round(self.total_discount)
|
||||||
self.total_amount = self.currency.round(self.total_amount)
|
self.total_amount = self.currency.round(self.total_amount)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user