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:
myoualid
2024-09-23 20:19:06 +01:00
parent ab8a6b80e4
commit 455012de4c
9 changed files with 267 additions and 200 deletions
+6
View File
@@ -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: