Company, Currency, Conversion Rate fields are mandatory in BOM

This commit is contained in:
Nabin Hait 2017-02-21 13:11:02 +05:30
parent 7056ce54d7
commit 6e1a2b16a5
2 changed files with 7 additions and 7 deletions

View File

@ -323,7 +323,7 @@
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
@ -378,7 +378,7 @@
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
@ -976,7 +976,7 @@
"read_only": 0,
"remember_last_selected_value": 1,
"report_hide": 0,
"reqd": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
@ -1271,8 +1271,8 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-11-21 17:06:49.349654",
"modified_by": "rohit@erpnext.com",
"modified": "2017-02-21 13:10:27.394012",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "BOM",
"owner": "Administrator",

View File

@ -321,9 +321,9 @@ class BOM(Document):
if d.bom_no:
d.rate = self.get_bom_unitcost(d.bom_no)
d.base_rate = d.rate * self.conversion_rate
d.base_rate = flt(d.rate) * flt(self.conversion_rate)
d.amount = flt(d.rate, self.precision("rate", d)) * flt(d.qty, self.precision("qty", d))
d.base_amount = d.amount * self.conversion_rate
d.base_amount = d.amount * flt(self.conversion_rate)
d.qty_consumed_per_unit = flt(d.qty, self.precision("qty", d)) / flt(self.quantity, self.precision("quantity"))
total_rm_cost += d.amount
base_total_rm_cost += d.base_amount