mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-18 22:35:10 +00:00
Co-authored-by: Sudharsanan Ashok <135326972+Sudharsanan11@users.noreply.github.com> fix(manufacturing): update condition for base hour rate calculation (#53753)
This commit is contained in:
@@ -944,12 +944,14 @@ class BOM(WebsiteGenerator):
|
|||||||
hour_rate / flt(self.conversion_rate) if self.conversion_rate and hour_rate else hour_rate
|
hour_rate / flt(self.conversion_rate) if self.conversion_rate and hour_rate else hour_rate
|
||||||
)
|
)
|
||||||
|
|
||||||
if row.hour_rate and row.time_in_mins:
|
if row.hour_rate:
|
||||||
row.base_hour_rate = flt(row.hour_rate) * flt(self.conversion_rate)
|
row.base_hour_rate = flt(row.hour_rate) * flt(self.conversion_rate)
|
||||||
row.operating_cost = flt(row.hour_rate) * flt(row.time_in_mins) / 60.0
|
|
||||||
row.base_operating_cost = flt(row.operating_cost) * flt(self.conversion_rate)
|
if row.time_in_mins:
|
||||||
row.cost_per_unit = row.operating_cost / (row.batch_size or 1.0)
|
row.operating_cost = flt(row.hour_rate) * flt(row.time_in_mins) / 60.0
|
||||||
row.base_cost_per_unit = row.base_operating_cost / (row.batch_size or 1.0)
|
row.base_operating_cost = flt(row.operating_cost) * flt(self.conversion_rate)
|
||||||
|
row.cost_per_unit = row.operating_cost / (row.batch_size or 1.0)
|
||||||
|
row.base_cost_per_unit = row.base_operating_cost / (row.batch_size or 1.0)
|
||||||
|
|
||||||
if update_hour_rate:
|
if update_hour_rate:
|
||||||
row.db_update()
|
row.db_update()
|
||||||
|
|||||||
Reference in New Issue
Block a user