fix in queries in stock reconciliation
This commit is contained in:
parent
964dee9f18
commit
063fe503db
@ -75,7 +75,8 @@ class DocType:
|
|||||||
|
|
||||||
def validate_item(self, item, count):
|
def validate_item(self, item, count):
|
||||||
""" Validate item exists and non-serialized"""
|
""" Validate item exists and non-serialized"""
|
||||||
det = sql("select item_code, has_serial_no from `tabItem` where name = '%s'"% cstr(item), as_dict = 1)
|
det = sql("select item_code, has_serial_no from `tabItem` \
|
||||||
|
where name = %s", cstr(item), as_dict = 1)
|
||||||
if not det:
|
if not det:
|
||||||
msgprint("Item: " + cstr(item) + " mentioned at Row No. " + cstr(count) + "does not exist in the system")
|
msgprint("Item: " + cstr(item) + " mentioned at Row No. " + cstr(count) + "does not exist in the system")
|
||||||
self.validated = 0
|
self.validated = 0
|
||||||
@ -88,7 +89,7 @@ class DocType:
|
|||||||
|
|
||||||
def validate_warehouse(self, wh, count,):
|
def validate_warehouse(self, wh, count,):
|
||||||
"""Validate warehouse exists"""
|
"""Validate warehouse exists"""
|
||||||
if not sql("select name from `tabWarehouse` where name = '%s'" % cstr(wh)):
|
if not sql("select name from `tabWarehouse` where name = %s", cstr(wh)):
|
||||||
msgprint("Warehouse: " + cstr(wh) + " mentioned at Row No. " + cstr(count) + " does not exist in the system")
|
msgprint("Warehouse: " + cstr(wh) + " mentioned at Row No. " + cstr(count) + " does not exist in the system")
|
||||||
self.validated = 0
|
self.validated = 0
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user