fix: use percent string templates for db.sql calls
This commit is contained in:
parent
ca37380d2e
commit
e36f303042
@ -935,8 +935,8 @@ def get_bin_details(item_code, warehouse, company=None):
|
|||||||
def get_company_total_stock(item_code, company):
|
def get_company_total_stock(item_code, company):
|
||||||
return frappe.db.sql("""SELECT sum(actual_qty) from
|
return frappe.db.sql("""SELECT sum(actual_qty) from
|
||||||
(`tabBin` INNER JOIN `tabWarehouse` ON `tabBin`.warehouse = `tabWarehouse`.name)
|
(`tabBin` INNER JOIN `tabWarehouse` ON `tabBin`.warehouse = `tabWarehouse`.name)
|
||||||
WHERE `tabWarehouse`.company = '{0}' and `tabBin`.item_code = '{1}'"""
|
WHERE `tabWarehouse`.company = %s and `tabBin`.item_code = %s""",
|
||||||
.format(company, item_code))[0][0]
|
(company, item_code))[0][0]
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_serial_no_details(item_code, warehouse, stock_qty, serial_no):
|
def get_serial_no_details(item_code, warehouse, stock_qty, serial_no):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user