mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
Increase rounding precision for updating cost item resource values #5706
Co-Authored-By: DimitriosThe <169245599+DimitriosThe@users.noreply.github.com>
This commit is contained in:
@@ -111,7 +111,7 @@ def calculate_cost_item_resource_value(file: ifcopenshell.file, cost_item: ifcop
|
||||
continue
|
||||
if unit and "day" in unit:
|
||||
quantity = quantity / 8 # Assume 8 hour working day - TODO implement resource calendar
|
||||
quantity = round(quantity, 2)
|
||||
quantity = round(quantity, 5)
|
||||
formula = "{}*{}".format(cost, quantity)
|
||||
cost_value = ifcopenshell.api.cost.add_cost_value(file, parent=settings["cost_item"])
|
||||
cost_value.Name = resource.Name
|
||||
|
||||
Reference in New Issue
Block a user