fix: Code cleanup
This commit is contained in:
parent
79d4400c16
commit
de718dacb2
@ -250,10 +250,12 @@ def get_serial_no_data(pos_profile, company):
|
|||||||
|
|
||||||
cond = "1=1"
|
cond = "1=1"
|
||||||
if pos_profile.get('update_stock') and pos_profile.get('warehouse'):
|
if pos_profile.get('update_stock') and pos_profile.get('warehouse'):
|
||||||
cond = "warehouse = '{0}'".format(pos_profile.get('warehouse'))
|
cond = "warehouse = %(warehouse)s"
|
||||||
|
|
||||||
serial_nos = frappe.db.sql("""select name, warehouse, item_code from `tabSerial No` where {0}
|
serial_nos = frappe.db.sql("""select name, warehouse, item_code
|
||||||
and company = %(company)s """.format(cond), {'company': company}, as_dict=1)
|
from `tabSerial No` where {0} and company = %(company)s """.format(cond),{
|
||||||
|
'company': company, 'warehouse': frappe.db.escape(pos_profile.get('warehouse'))
|
||||||
|
}, as_dict=1)
|
||||||
|
|
||||||
itemwise_serial_no = {}
|
itemwise_serial_no = {}
|
||||||
for sn in serial_nos:
|
for sn in serial_nos:
|
||||||
|
Loading…
Reference in New Issue
Block a user