From 043f70e9a65b86375cc592604d51833a2dd2bad7 Mon Sep 17 00:00:00 2001 From: deepeshgarg007 Date: Mon, 5 Aug 2019 12:40:50 +0530 Subject: [PATCH] fix: Aambigious column in query --- erpnext/accounts/doctype/pricing_rule/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/pricing_rule/utils.py b/erpnext/accounts/doctype/pricing_rule/utils.py index 5795b8f808..bbabac4302 100644 --- a/erpnext/accounts/doctype/pricing_rule/utils.py +++ b/erpnext/accounts/doctype/pricing_rule/utils.py @@ -382,7 +382,7 @@ def get_qty_amount_data_for_cumulative(pr_doc, doc, items=[]): `tab{child_doc}`.amount FROM `tab{child_doc}`, `tab{parent_doc}` WHERE - `tab{child_doc}`.parent = `tab{parent_doc}`.name and {date_field} + `tab{child_doc}`.parent = `tab{parent_doc}`.name and `tab{parent_doc}`.{date_field} between %s and %s and `tab{parent_doc}`.docstatus = 1 {condition} group by `tab{child_doc}`.name """.format(parent_doc = doctype,