mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
fix calculating cost summary #4704 (was confusing 0 qty and no qty)
similar to 295d0a677
This commit is contained in:
@@ -102,7 +102,8 @@ def sum_child_root_elements(root_element: ifcopenshell.entity_instance, category
|
||||
if category_filter and child_cost_value.Category != category_filter:
|
||||
continue
|
||||
child_applied_value = calculate_applied_value(child_root_element, child_cost_value)
|
||||
child_quantity = get_total_quantity(child_root_element) or 1.0
|
||||
child_quantity = get_total_quantity(child_root_element)
|
||||
child_quantity = 1.0 if child_quantity is None else child_quantity
|
||||
if child_cost_value.UnitBasis:
|
||||
value_component = child_cost_value.UnitBasis.ValueComponent.wrappedValue
|
||||
result += child_quantity / value_component * child_applied_value
|
||||
|
||||
Reference in New Issue
Block a user