mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 10:49:09 +00:00
fix: dont hardcode hour rate precision
This commit is contained in:
committed by
Ankush Menat
parent
18e2a33a9b
commit
362102e802
@@ -198,7 +198,7 @@ class BOM(WebsiteGenerator):
|
|||||||
for row in frappe.get_all("BOM Operation", fields = fields,
|
for row in frappe.get_all("BOM Operation", fields = fields,
|
||||||
filters = {'parenttype': 'Routing', 'parent': self.routing}, order_by="sequence_id, idx"):
|
filters = {'parenttype': 'Routing', 'parent': self.routing}, order_by="sequence_id, idx"):
|
||||||
child = self.append('operations', row)
|
child = self.append('operations', row)
|
||||||
child.hour_rate = flt(row.hour_rate / self.conversion_rate, 2)
|
child.hour_rate = flt(row.hour_rate / self.conversion_rate, child.precision("hour_rate"))
|
||||||
|
|
||||||
def set_bom_material_details(self):
|
def set_bom_material_details(self):
|
||||||
for item in self.get("items"):
|
for item in self.get("items"):
|
||||||
|
|||||||
@@ -66,7 +66,8 @@
|
|||||||
"label": "Hour Rate",
|
"label": "Hour Rate",
|
||||||
"oldfieldname": "hour_rate",
|
"oldfieldname": "hour_rate",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
"options": "currency"
|
"options": "currency",
|
||||||
|
"precision": "2"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "In minutes",
|
"description": "In minutes",
|
||||||
@@ -186,7 +187,7 @@
|
|||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2021-12-15 03:00:00.473173",
|
"modified": "2022-03-10 06:19:08.462027",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Manufacturing",
|
"module": "Manufacturing",
|
||||||
"name": "BOM Operation",
|
"name": "BOM Operation",
|
||||||
|
|||||||
Reference in New Issue
Block a user