mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-06 21:59:13 +00:00
serial no fix
This commit is contained in:
@@ -107,7 +107,7 @@ class DocType(TransactionBase):
|
|||||||
def on_trash(self):
|
def on_trash(self):
|
||||||
if self.doc.status == 'Delivered':
|
if self.doc.status == 'Delivered':
|
||||||
msgprint("Cannot trash Serial No : %s as it is already Delivered" % (self.doc.name), raise_exception = 1)
|
msgprint("Cannot trash Serial No : %s as it is already Delivered" % (self.doc.name), raise_exception = 1)
|
||||||
else:
|
elif self.doc.status == 'In Store':
|
||||||
webnotes.conn.set(self.doc, 'status', 'Not in Use')
|
webnotes.conn.set(self.doc, 'status', 'Not in Use')
|
||||||
self.make_stock_ledger_entry(-1)
|
self.make_stock_ledger_entry(-1)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user