mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-13 02:01:21 +00:00
[cleanup] [minor] deprecated cancelled stock ledger entry
This commit is contained in:
8
patches/august_2013/p06_deprecate_cancelled_sl_entry.py
Normal file
8
patches/august_2013/p06_deprecate_cancelled_sl_entry.py
Normal file
@@ -0,0 +1,8 @@
|
||||
import webnotes
|
||||
def execute():
|
||||
webnotes.reload_doc("stock", "doctype", "stock_ledger_entry")
|
||||
webnotes.reload_doc("stock", "doctype", "serial_no")
|
||||
webnotes.reload_doc("stock", "report", "stock_ledger")
|
||||
|
||||
webnotes.conn.sql("""delete from `tabStock Ledger Entry`
|
||||
where ifnull(is_cancelled, 'No') = 'Yes'""")
|
||||
@@ -37,7 +37,7 @@ def execute():
|
||||
limit 1
|
||||
"""% (s, s, s, s, d['parent']), as_dict=1)
|
||||
|
||||
status = 'Not in Use'
|
||||
status = 'Not Available'
|
||||
if sle and flt(sle[0]['actual_qty']) > 0:
|
||||
status = 'Available'
|
||||
elif sle and flt(sle[0]['actual_qty']) < 0:
|
||||
|
||||
@@ -258,4 +258,5 @@ patch_list = [
|
||||
"patches.august_2013.p05_employee_birthdays",
|
||||
"execute:webnotes.reload_doc('accounts', 'Print Format', 'POS Invoice') # 2013-08-16",
|
||||
"execute:webnotes.delete_doc('DocType', 'Stock Ledger')",
|
||||
"patches.august_2013.p06_deprecate_cancelled_sl_entry",
|
||||
]
|
||||
Reference in New Issue
Block a user