handle tax childs #6

Merged
mdsfred merged 2 commits from jangras/edocument_xrechnung:wip_jan into main 2025-01-09 08:33:34 +00:00
Showing only changes of commit dba1965894 - Show all commits

View file

@ -110,8 +110,8 @@ class EdocumentMixin(object):
tax = line.taxes[0]
date = line.invoice.accounting_date or line.invoice.invoice_date
for child in tax.childs:
start_date = tax.start_date or datetime.date.min
end_date = tax.end_date or datetime.date.max
start_date = child.start_date or datetime.date.min
end_date = child.end_date or datetime.date.max
if start_date <= date <= end_date:
tax = child
break