mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 14:31:39 +00:00
cost web ui:
- add "Linked rate" column, - assign a cost rate to multiple cost items by selecting linked rate cells & clicking the "assign" button on the chosen cost rate #5369
This commit is contained in:
@@ -55,11 +55,17 @@ class ifc5D2json:
|
||||
self.extract_cost_item_quantities(cost_item, data)
|
||||
self.populate_cost_values(cost_item, data)
|
||||
self.populate_nesting_index(cost_item, data)
|
||||
cost_rate = ifcopenshell.util.cost.get_cost_rate(self.file, cost_item)
|
||||
data = {**data, **cost_item.get_info(recursive=True)}
|
||||
data["id"] = cost_item.id()
|
||||
data["IsNestedBy"] = []
|
||||
data["IsSum"] = self.check_if_cost_item_is_sum(cost_item)
|
||||
data["Classification"] = self.get_cost_classifications(cost_item)
|
||||
data["CostRate"] = {
|
||||
"id": cost_rate.id() if cost_rate else None,
|
||||
"Identification": cost_rate.Identification if cost_rate else None,
|
||||
"Name": cost_rate.Name if cost_rate else None,
|
||||
}
|
||||
json_data.append(data)
|
||||
for rel in cost_item.IsNestedBy or []:
|
||||
for sub_cost in rel.RelatedObjects:
|
||||
|
||||
Reference in New Issue
Block a user