mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-04 12:49:10 +00:00
Target Warehouse in Delivery Note and Sales Invoice and removed Serial No status
This commit is contained in:
@@ -214,8 +214,7 @@ def set_stock_balance_as_per_serial_no(item_code=None, posting_date=None, postin
|
||||
|
||||
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 @@ def reset_serial_no_status_and_warehouse(serial_nos=None):
|
||||
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'""")
|
||||
|
||||
Reference in New Issue
Block a user