Merge pull request #40828 from rohitwaghchaure/chore-removed-manual-option-from-bom

chore: remove rate of material based on Manual
diff --git a/erpnext/accounts/report/pos_register/pos_register.py b/erpnext/accounts/report/pos_register/pos_register.py
index 7640ae8..2248f6e 100644
--- a/erpnext/accounts/report/pos_register/pos_register.py
+++ b/erpnext/accounts/report/pos_register/pos_register.py
@@ -61,10 +61,11 @@
 		order_by += f", p.{group_by_field}"
 		select_mop_field = ", p.base_paid_amount - p.change_amount  as paid_amount "
 
+	# nosemgrep
 	return frappe.db.sql(
 		f"""
 		SELECT
-			p.posting_date, p.name as pos_invoice, p.pos_profile,
+			p.posting_date, p.name as pos_invoice, p.pos_profile, p.company,
 			p.owner, p.customer, p.is_return, p.base_grand_total as grand_total {select_mop_field}
 		FROM
 			`tabPOS Invoice` p {from_sales_invoice_payment}
@@ -201,14 +202,14 @@
 			"label": _("Grand Total"),
 			"fieldname": "grand_total",
 			"fieldtype": "Currency",
-			"options": "company:currency",
+			"options": "Company:company:default_currency",
 			"width": 120,
 		},
 		{
 			"label": _("Paid Amount"),
 			"fieldname": "paid_amount",
 			"fieldtype": "Currency",
-			"options": "company:currency",
+			"options": "Company:company:default_currency",
 			"width": 120,
 		},
 		{
@@ -218,6 +219,13 @@
 			"width": 150,
 		},
 		{"label": _("Is Return"), "fieldname": "is_return", "fieldtype": "Data", "width": 80},
+		{
+			"label": _("Company"),
+			"fieldname": "company",
+			"fieldtype": "Link",
+			"options": "Company",
+			"width": 120,
+		},
 	]
 
 	return columns
diff --git a/erpnext/assets/report/fixed_asset_register/fixed_asset_register.py b/erpnext/assets/report/fixed_asset_register/fixed_asset_register.py
index f299d69..3d4473f 100644
--- a/erpnext/assets/report/fixed_asset_register/fixed_asset_register.py
+++ b/erpnext/assets/report/fixed_asset_register/fixed_asset_register.py
@@ -145,6 +145,7 @@
 			"asset_category": asset.asset_category,
 			"purchase_date": asset.purchase_date,
 			"asset_value": asset_value,
+			"company": asset.company,
 		}
 		data.append(row)
 
@@ -369,30 +370,37 @@
 				"label": _("Gross Purchase Amount"),
 				"fieldname": "gross_purchase_amount",
 				"fieldtype": "Currency",
-				"options": "company:currency",
+				"options": "Company:company:default_currency",
 				"width": 250,
 			},
 			{
 				"label": _("Opening Accumulated Depreciation"),
 				"fieldname": "opening_accumulated_depreciation",
 				"fieldtype": "Currency",
-				"options": "company:currency",
+				"options": "Company:company:default_currency",
 				"width": 250,
 			},
 			{
 				"label": _("Depreciated Amount"),
 				"fieldname": "depreciated_amount",
 				"fieldtype": "Currency",
-				"options": "company:currency",
+				"options": "Company:company:default_currency",
 				"width": 250,
 			},
 			{
 				"label": _("Asset Value"),
 				"fieldname": "asset_value",
 				"fieldtype": "Currency",
-				"options": "company:currency",
+				"options": "Company:company:default_currency",
 				"width": 250,
 			},
+			{
+				"label": _("Company"),
+				"fieldname": "company",
+				"fieldtype": "Link",
+				"options": "Company",
+				"width": 120,
+			},
 		]
 
 	return [
@@ -423,28 +431,28 @@
 			"label": _("Gross Purchase Amount"),
 			"fieldname": "gross_purchase_amount",
 			"fieldtype": "Currency",
-			"options": "company:currency",
+			"options": "Company:company:default_currency",
 			"width": 100,
 		},
 		{
 			"label": _("Asset Value"),
 			"fieldname": "asset_value",
 			"fieldtype": "Currency",
-			"options": "company:currency",
+			"options": "Company:company:default_currency",
 			"width": 100,
 		},
 		{
 			"label": _("Opening Accumulated Depreciation"),
 			"fieldname": "opening_accumulated_depreciation",
 			"fieldtype": "Currency",
-			"options": "company:currency",
+			"options": "Company:company:default_currency",
 			"width": 90,
 		},
 		{
 			"label": _("Depreciated Amount"),
 			"fieldname": "depreciated_amount",
 			"fieldtype": "Currency",
-			"options": "company:currency",
+			"options": "Company:company:default_currency",
 			"width": 100,
 		},
 		{
@@ -469,4 +477,11 @@
 			"options": "Location",
 			"width": 100,
 		},
+		{
+			"label": _("Company"),
+			"fieldname": "company",
+			"fieldtype": "Link",
+			"options": "Company",
+			"width": 120,
+		},
 	]
diff --git a/erpnext/manufacturing/doctype/bom_creator/bom_creator.py b/erpnext/manufacturing/doctype/bom_creator/bom_creator.py
index e32d9a7..0158f7c 100644
--- a/erpnext/manufacturing/doctype/bom_creator/bom_creator.py
+++ b/erpnext/manufacturing/doctype/bom_creator/bom_creator.py
@@ -236,6 +236,9 @@
 						frappe._dict({"items": [], "bom_no": "", "fg_item_data": row}),
 					)
 
+			if not row.fg_reference_id and production_item_wise_rm.get((row.fg_item, row.fg_reference_id)):
+				frappe.throw(_("Please set Parent Row No for item {0}").format(row.fg_item))
+
 			production_item_wise_rm[(row.fg_item, row.fg_reference_id)]["items"].append(row)
 
 		reverse_tree = OrderedDict(reversed(list(production_item_wise_rm.items())))