Cost values are now serialised and shown as formulas

This commit is contained in:
Dion Moult
2021-08-26 21:37:14 +10:00
parent c96d1e6387
commit 5e1fbacef7
4 changed files with 154 additions and 2 deletions
@@ -1,5 +1,6 @@
import ifcopenshell.util.date
import ifcopenshell.util.unit
import ifcopenshell.util.cost
class Data:
@@ -148,6 +149,8 @@ class Data:
cost_item_data["CategoryValues"].setdefault(cost_value.Category, 0)
cost_item_data["CategoryValues"][cost_value.Category] += value_data["AppliedValue"]
value_data["Formula"] = ifcopenshell.util.cost.serialise_cost_value(cost_value)
cls.cost_values[cost_value.id()] = value_data
for component in cost_value.Components or []:
cls.load_cost_item_value(cost_item, cost_item_data, component)