mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-17 16:45:02 +00:00
chore: remove rate of material based on Manual
This commit is contained in:
@@ -238,7 +238,7 @@
|
||||
"fieldname": "rm_cost_as_per",
|
||||
"fieldtype": "Select",
|
||||
"label": "Rate Of Materials Based On",
|
||||
"options": "Valuation Rate\nLast Purchase Rate\nPrice List\nManual"
|
||||
"options": "Valuation Rate\nLast Purchase Rate\nPrice List"
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 1,
|
||||
@@ -637,7 +637,7 @@
|
||||
"image_field": "image",
|
||||
"is_submittable": 1,
|
||||
"links": [],
|
||||
"modified": "2024-03-27 13:06:40.214929",
|
||||
"modified": "2024-04-02 16:22:47.518411",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Manufacturing",
|
||||
"name": "BOM",
|
||||
|
||||
@@ -147,7 +147,7 @@ class BOM(WebsiteGenerator):
|
||||
quality_inspection_template: DF.Link | None
|
||||
quantity: DF.Float
|
||||
raw_material_cost: DF.Currency
|
||||
rm_cost_as_per: DF.Literal["Valuation Rate", "Last Purchase Rate", "Price List", "Manual"]
|
||||
rm_cost_as_per: DF.Literal["Valuation Rate", "Last Purchase Rate", "Price List"]
|
||||
route: DF.SmallText | None
|
||||
routing: DF.Link | None
|
||||
scrap_items: DF.Table[BOMScrapItem]
|
||||
@@ -737,6 +737,7 @@ class BOM(WebsiteGenerator):
|
||||
|
||||
def calculate_rm_cost(self, save=False):
|
||||
"""Fetch RM rate as per today's valuation rate and calculate totals"""
|
||||
|
||||
total_rm_cost = 0
|
||||
base_total_rm_cost = 0
|
||||
|
||||
@@ -745,7 +746,7 @@ class BOM(WebsiteGenerator):
|
||||
continue
|
||||
|
||||
old_rate = d.rate
|
||||
if self.rm_cost_as_per != "Manual":
|
||||
if not self.bom_creator:
|
||||
d.rate = self.get_rm_rate(
|
||||
{
|
||||
"company": self.company,
|
||||
@@ -1017,8 +1018,6 @@ def get_bom_item_rate(args, bom_doc):
|
||||
item_doc = frappe.get_cached_doc("Item", args.get("item_code"))
|
||||
price_list_data = get_price_list_rate(bom_args, item_doc)
|
||||
rate = price_list_data.price_list_rate
|
||||
elif bom_doc.rm_cost_as_per == "Manual":
|
||||
return
|
||||
|
||||
return flt(rate)
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
"fieldname": "rm_cost_as_per",
|
||||
"fieldtype": "Select",
|
||||
"label": "Rate Of Materials Based On",
|
||||
"options": "Valuation Rate\nLast Purchase Rate\nPrice List\nManual",
|
||||
"options": "Valuation Rate\nLast Purchase Rate\nPrice List",
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
@@ -288,7 +288,7 @@
|
||||
"link_fieldname": "bom_creator"
|
||||
}
|
||||
],
|
||||
"modified": "2024-03-27 13:06:40.535884",
|
||||
"modified": "2024-04-02 16:30:59.779190",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Manufacturing",
|
||||
"name": "BOM Creator",
|
||||
|
||||
@@ -59,7 +59,7 @@ class BOMCreator(Document):
|
||||
qty: DF.Float
|
||||
raw_material_cost: DF.Currency
|
||||
remarks: DF.TextEditor | None
|
||||
rm_cost_as_per: DF.Literal["Valuation Rate", "Last Purchase Rate", "Price List", "Manual"]
|
||||
rm_cost_as_per: DF.Literal["Valuation Rate", "Last Purchase Rate", "Price List"]
|
||||
set_rate_based_on_warehouse: DF.Check
|
||||
status: DF.Literal["Draft", "Submitted", "In Progress", "Completed", "Failed", "Cancelled"]
|
||||
uom: DF.Link | None
|
||||
@@ -141,9 +141,6 @@ class BOMCreator(Document):
|
||||
self.submit()
|
||||
|
||||
def set_rate_for_items(self):
|
||||
if self.rm_cost_as_per == "Manual":
|
||||
return
|
||||
|
||||
amount = self.get_raw_material_cost()
|
||||
self.raw_material_cost = amount
|
||||
|
||||
@@ -282,7 +279,6 @@ class BOMCreator(Document):
|
||||
"allow_alternative_item": 1,
|
||||
"bom_creator": self.name,
|
||||
"bom_creator_item": bom_creator_item,
|
||||
"rm_cost_as_per": "Manual",
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user