From 8ffa208ca74010a143c77bad1784402f0997084b Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Mon, 11 Nov 2024 18:11:43 +0500 Subject: [PATCH] Increase rounding precision for updating cost item resource values #5706 Co-Authored-By: DimitriosThe <169245599+DimitriosThe@users.noreply.github.com> --- .../ifcopenshell/api/cost/calculate_cost_item_resource_value.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifcopenshell-python/ifcopenshell/api/cost/calculate_cost_item_resource_value.py b/src/ifcopenshell-python/ifcopenshell/api/cost/calculate_cost_item_resource_value.py index b160803d0a..91a357a66c 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/cost/calculate_cost_item_resource_value.py +++ b/src/ifcopenshell-python/ifcopenshell/api/cost/calculate_cost_item_resource_value.py @@ -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