This commit is contained in:
Jan Grasnik 2025-01-04 21:08:43 +01:00
parent f3b4849e0c
commit dba1965894

View file

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