[fix] Patch (#11976)

This commit is contained in:
rohitwaghchaure 2017-12-13 18:35:22 +05:30 committed by Nabin Hait
parent aa66fa17d7
commit 659b46832c

View File

@ -34,8 +34,8 @@ def execute():
else:
template = frappe.get_doc("Payment Terms Template", pyt_template_name)
payment_terms.append('WHEN `name`="%s" THEN "%s"' % (party_name, template.template_name))
records.append(party_name)
payment_terms.append('WHEN `name`="%s" THEN "%s"' % (frappe.db.escape(party_name), template.template_name))
records.append(frappe.db.escape(party_name))
begin_query_str = "UPDATE `tab{0}` SET `payment_terms` = CASE ".format(doctype)
value_query_str = " ".join(payment_terms)