Target Warehouse in Delivery Note and Sales Invoice and removed Serial No status
diff --git a/erpnext/stock/stock_balance.py b/erpnext/stock/stock_balance.py
index cba2464..dd62e15 100644
--- a/erpnext/stock/stock_balance.py
+++ b/erpnext/stock/stock_balance.py
@@ -214,8 +214,7 @@
def reset_serial_no_status_and_warehouse(serial_nos=None):
if not serial_nos:
- serial_nos = frappe.db.sql_list("""select name from `tabSerial No` where status != 'Not in Use'
- and docstatus = 0""")
+ serial_nos = frappe.db.sql_list("""select name from `tabSerial No` where docstatus = 0""")
for serial_no in serial_nos:
try:
sr = frappe.get_doc("Serial No", serial_no)
@@ -228,8 +227,6 @@
except:
pass
- frappe.db.sql("""update `tabSerial No` set warehouse='' where status in ('Delivered', 'Purchase Returned')""")
-
def repost_all_stock_vouchers():
warehouses_with_account = frappe.db.sql_list("""select master_name from tabAccount
where ifnull(account_type, '') = 'Warehouse'""")