minor fix
This commit is contained in:
parent
1b6fae6152
commit
738ba34c83
Binary file not shown.
|
@ -224,13 +224,13 @@ class Operation(Workflow, ModelSQL, ModelView):
|
|||
|
||||
def get_unit_price_w_tax(self, name=None):
|
||||
Tax = Pool().get('account.tax')
|
||||
res = 0
|
||||
if self.unit_price and self.accommodation:
|
||||
res = self.unit_price
|
||||
if self.unit_price and self.accommodation and not self.taxes_exception:
|
||||
values = Tax.compute(
|
||||
self.accommodation.template.customer_taxes_used,
|
||||
self.unit_price or _ZERO, 1
|
||||
)
|
||||
if values:
|
||||
if len(values) > 0:
|
||||
value = values[0]
|
||||
res = value['base'] + value['amount']
|
||||
return round(res, Operation.total_amount.digits[1])
|
||||
|
|
Loading…
Reference in New Issue