Merge branch 'master' of github.com:webnotes/erpnext

This commit is contained in:
Anand Doshi 2013-08-09 15:13:53 +05:30
commit 1da188ad17
2 changed files with 2 additions and 3 deletions

View File

@ -121,8 +121,7 @@ class DocType:
def get_current(self, arg=None):
"""get series current"""
self.doc.current_value = webnotes.conn.sql("""select current from tabSeries where name=%s""",
self.doc.prefix)[0][0]
self.doc.current_value = webnotes.conn.get_value("Series", self.doc.prefix, "current")
def insert_series(self, series):
"""insert series if missing"""

View File

@ -118,7 +118,7 @@ class DocType:
elif purpose == 'Sales Return':
webnotes.conn.sql("update `tabSerial No` set status = 'Delivered', purchase_document_type = '', purchase_document_no = '' where name = '%s'" % serial_no)
else:
webnotes.conn.sql("update `tabSerial No` set docstatus = 2, status = 'Not in Use', purchase_document_type = '', purchase_document_no = '', purchase_date = null, purchase_rate = 0, supplier = null, supplier_name = '', supplier_address = '', warehouse = '' where name = '%s'" % serial_no)
webnotes.conn.sql("update `tabSerial No` set docstatus = 2, status = 'Not in Use', purchase_document_type = '', purchase_document_no = '', purchase_date = null, purchase_rate = 0, supplier = null, supplier_name = '', address_display = '', warehouse = '' where name = '%s'" % serial_no)
def check_serial_no_exists(self, serial_no, item_code):