fix: query condition change
This commit is contained in:
committed by
Deepesh Garg
parent
e93ac3c9a8
commit
88ce59a1ca
@@ -6,6 +6,7 @@ import copy
|
|||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
from frappe import _
|
from frappe import _
|
||||||
|
from frappe.desk.reportview import get_match_cond
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
from frappe.utils import add_days, add_months, format_date, getdate, today
|
from frappe.utils import add_days, add_months, format_date, getdate, today
|
||||||
from frappe.utils.jinja import validate_template
|
from frappe.utils.jinja import validate_template
|
||||||
@@ -274,8 +275,12 @@ def get_customer_emails(customer_name, primary_mandatory, billing_and_primary=Tr
|
|||||||
link.link_doctype='Customer'
|
link.link_doctype='Customer'
|
||||||
and link.link_name=%s
|
and link.link_name=%s
|
||||||
and contact.is_billing_contact=1
|
and contact.is_billing_contact=1
|
||||||
|
{mcond}
|
||||||
ORDER BY
|
ORDER BY
|
||||||
contact.creation desc""",
|
contact.creation desc
|
||||||
|
""".format(
|
||||||
|
mcond=get_match_cond("Contact")
|
||||||
|
),
|
||||||
customer_name,
|
customer_name,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user