Merge pull request #49345 from rohitwaghchaure/fxied-minor-fixes-08-27

chore: minor fixes
This commit is contained in:
rohitwaghchaure
2025-08-28 07:35:29 +05:30
committed by GitHub
4 changed files with 31 additions and 8 deletions

View File

@@ -532,6 +532,13 @@ frappe.ui.form.on("BOM", {
});
frappe.ui.form.on("BOM Operation", {
finished_good(frm, cdt, cdn) {
let row = locals[cdt][cdn];
if (row.finished_good === frm.doc.item) {
frappe.model.set_value(row.doctype, row.name, "is_final_finished_good", 1);
}
},
bom_no(frm, cdt, cdn) {
let row = locals[cdt][cdn];

View File

@@ -764,6 +764,9 @@ class BOM(WebsiteGenerator):
if not frappe.db.exists("BOM", {"item": finished_good, "name": bom_no, "docstatus": 1}):
frappe.throw(_("BOM {0} not found for the item {1}").format(bom_no, finished_good))
if self.items and not self.items[0].item_code:
self.set("items", [])
if not qty:
qty = 1

View File

@@ -51,19 +51,19 @@
{
"fieldname": "purchase_receipts",
"fieldtype": "Table",
"label": "Receipts",
"label": "Vouchers",
"options": "Landed Cost Purchase Receipt",
"reqd": 1
},
{
"fieldname": "purchase_receipt_items",
"fieldtype": "Section Break",
"label": "Purchase Receipt Items"
"label": "Items"
},
{
"fieldname": "get_items_from_purchase_receipts",
"fieldtype": "Button",
"label": "Get Items From Receipts"
"label": "Get Items"
},
{
"fieldname": "items",
@@ -162,7 +162,7 @@
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2025-07-30 19:25:04.899698",
"modified": "2025-08-27 00:41:53.537375",
"modified_by": "Administrator",
"module": "Stock",
"name": "Landed Cost Voucher",

View File

@@ -108,6 +108,12 @@ class ReportData:
sabb.reference_name,
"work_order",
)
elif sabb.reference_doctype == "Delivery Note":
row["customer"] = frappe.db.get_value(
"Delivery Note",
sabb.reference_name,
"customer",
)
data.append(row)
@@ -500,22 +506,29 @@ class ReportData:
"options": "Work Order",
"width": 160,
},
]
)
if self.filters.get("traceability_direction") == "Backward":
columns.append(
{
"fieldname": "supplier",
"label": _("Supplier"),
"fieldtype": "Link",
"options": "Supplier",
"width": 150,
},
}
)
else:
columns.append(
{
"fieldname": "customer",
"label": _("Customer"),
"fieldtype": "Link",
"options": "Customer",
"width": 150,
},
]
)
}
)
if has_serial_no:
columns.extend(