Merge pull request #25731 from ankush/escaping_company_name
fix: escape company name
This commit is contained in:
commit
5da34bddd6
@ -41,7 +41,7 @@ def build_conditions(process_type, account, company):
|
|||||||
if account:
|
if account:
|
||||||
conditions += "AND %s='%s'"%(deferred_account, account)
|
conditions += "AND %s='%s'"%(deferred_account, account)
|
||||||
elif company:
|
elif company:
|
||||||
conditions += "AND p.company='%s'"%(company)
|
conditions += f"AND p.company = {frappe.db.escape(company)}"
|
||||||
|
|
||||||
return conditions
|
return conditions
|
||||||
|
|
||||||
@ -360,12 +360,10 @@ def make_gl_entries(doc, credit_account, debit_account, against,
|
|||||||
frappe.flags.deferred_accounting_error = True
|
frappe.flags.deferred_accounting_error = True
|
||||||
|
|
||||||
def send_mail(deferred_process):
|
def send_mail(deferred_process):
|
||||||
title = _("Error while processing deferred accounting for {0}".format(deferred_process))
|
title = _("Error while processing deferred accounting for {0}").format(deferred_process)
|
||||||
content = _("""
|
link = get_link_to_form('Process Deferred Accounting', deferred_process)
|
||||||
Deferred accounting failed for some invoices:
|
content = _("Deferred accounting failed for some invoices:") + "\n"
|
||||||
Please check Process Deferred Accounting {0}
|
content += _("Please check Process Deferred Accounting {0} and submit manually after resolving errors.").format(link)
|
||||||
and submit manually after resolving errors
|
|
||||||
""").format(get_link_to_form('Process Deferred Accounting', deferred_process))
|
|
||||||
sendmail_to_system_managers(title, content)
|
sendmail_to_system_managers(title, content)
|
||||||
|
|
||||||
def book_revenue_via_journal_entry(doc, credit_account, debit_account, against,
|
def book_revenue_via_journal_entry(doc, credit_account, debit_account, against,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user