fix: check posting_date in args (backport #53303) (#53612)

Co-authored-by: Vishnu Priya Baskaran <145791817+ervishnucs@users.noreply.github.com>
fix: check posting_date in args (#53303)
This commit is contained in:
mergify[bot]
2026-03-19 05:01:34 +00:00
committed by GitHub
parent 2ccac6c479
commit f394ead878

View File

@@ -243,8 +243,10 @@ def get_other_conditions(conditions, values, args):
if group_condition: if group_condition:
conditions += " and " + group_condition conditions += " and " + group_condition
date = args.get("transaction_date") or frappe.get_value( date = (
args.get("doctype"), args.get("name"), "posting_date", ignore=True args.get("transaction_date")
or args.get("posting_date")
or frappe.get_value(args.get("doctype"), args.get("name"), "posting_date", ignore=True)
) )
if date: if date:
conditions += """ and %(transaction_date)s between ifnull(`tabPricing Rule`.valid_from, '2000-01-01') conditions += """ and %(transaction_date)s between ifnull(`tabPricing Rule`.valid_from, '2000-01-01')