Fix load-detail and load-update page JS, add route-planner, fix pallet_list directory

This commit is contained in:
Westech Admin
2026-05-20 04:15:43 +00:00
parent 233734c09f
commit 34d5c9cf59
85 changed files with 2743 additions and 18 deletions
@@ -0,0 +1,17 @@
import frappe
import json
@frappe.whitelist()
def save_load_items(load_name, items):
items = json.loads(items)
load_doc = frappe.get_doc("Load", load_name)
for item_data in items:
for row in load_doc.material_items:
if row.name == item_data["name"]:
for field, value in item_data.items():
if field != "name":
row.set(field, value)
break
load_doc.save(ignore_permissions=True)
frappe.db.commit()
return {"status": "ok", "message": "Saved " + str(len(items)) + " items"}