calculate_cost_item_resource_value not to skip 0 costs/quantities

That way all assigned resources will be added as cost values to cost items and it will be more apparent what resources were used for the last calculation and what costs/quantities they had at the time.
This commit is contained in:
Andrej730
2024-11-11 18:15:40 +05:00
parent 8ffa208ca7
commit 70e75f5ed2
@@ -107,7 +107,7 @@ def calculate_cost_item_resource_value(file: ifcopenshell.file, cost_item: ifcop
assert parent_cost
cost, unit = parent_cost
quantity = ifcopenshell.util.resource.get_quantity(resource)
if not cost or not quantity:
if cost is None or quantity is None:
continue
if unit and "day" in unit:
quantity = quantity / 8 # Assume 8 hour working day - TODO implement resource calendar