Merge branch 'develop' into fix-margin-for-filter

This commit is contained in:
Shivam Mishra 2020-08-11 09:11:30 +00:00 committed by GitHub
commit c798c6abbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -611,7 +611,7 @@ def get_partywise_advanced_payment_amount(party_type, posting_date = None, futur
cond = "posting_date <= '{0}'".format(posting_date)
if company:
cond += "and company = '{0}'".format(frappe.db.escape(company))
cond += "and company = {0}".format(frappe.db.escape(company))
data = frappe.db.sql(""" SELECT party, sum({0}) as amount
FROM `tabGL Entry`

View File

@ -90,7 +90,7 @@ class PayrollEntry(Document):
cond = ''
for f in ['company', 'branch', 'department', 'designation']:
if self.get(f):
cond += " and t1." + f + " = '" + self.get(f).replace("'", "\'") + "'"
cond += " and t1." + f + " = " + frappe.db.escape(self.get(f))
return cond