invoice-line: accept incomplete tax data
This commit is contained in:
parent
77b9aebe4b
commit
83bb948e78
1 changed files with 8 additions and 3 deletions
|
@ -733,6 +733,11 @@ class Incoming(metaclass=PoolMeta):
|
|||
line_taxes = line_data.pop('taxes', [])
|
||||
for x in line_taxes:
|
||||
percent = x.get('percent', None)
|
||||
if cfg1 and cfg1.accept_incomplete_tax:
|
||||
if percent is not None:
|
||||
percent = percent / Decimal('100')
|
||||
tax_and_category.append(get_tax_by_percent(percent))
|
||||
else:
|
||||
if (x.get('type', '') == 'VAT') and (percent is not None):
|
||||
percent = percent / Decimal('100')
|
||||
tax_and_category.append(get_tax_by_percent(percent))
|
||||
|
|
Loading…
Reference in a new issue