Merge pull request #44921 from ljain112/fix-val-itt

fix: get item tax template based on posting date
This commit is contained in:
ruthra kumar
2024-12-30 12:28:58 +05:30
committed by GitHub

View File

@@ -630,7 +630,9 @@ def _get_item_tax_template(
if tax.valid_from or tax.maximum_net_rate:
# In purchase Invoice first preference will be given to supplier invoice date
# if supplier date is not present then posting date
validation_date = ctx.get("bill_date") or ctx.get("transaction_date")
validation_date = (
ctx.get("bill_date") or ctx.get("posting_date") or ctx.get("transaction_date")
)
if getdate(tax.valid_from) <= getdate(validation_date) and is_within_valid_range(ctx, tax):
taxes_with_validity.append(tax)