From d0f7c7f63a850cd830ca5716f6b7054e261a744f Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Mon, 23 Sep 2024 16:08:06 +0100 Subject: [PATCH] updating cwi costs --- recommendations/Costs.py | 37 +++++++------------------- recommendations/WallRecommendations.py | 2 +- 2 files changed, 10 insertions(+), 29 deletions(-) diff --git a/recommendations/Costs.py b/recommendations/Costs.py index 101de0dd..e1b16899 100644 --- a/recommendations/Costs.py +++ b/recommendations/Costs.py @@ -257,7 +257,6 @@ class Costs: :return: A dictionary containing detailed cost breakdown. """ - # CWI usually takes 1 day labour_hours = 8 labour_days = 1 @@ -272,40 +271,22 @@ class Costs: "labour_days": labour_days, } - material_cost_per_m2 = material["material_cost"] - - base_material_cost = material_cost_per_m2 * wall_area - labour_cost = material["labour_cost"] * wall_area * self.labour_adjustment_factor - - subtotal_before_profit = base_material_cost + labour_cost - - contingency_cost = subtotal_before_profit * self.CONTINGENCY - preliminaries_cost = subtotal_before_profit * self.PRELIMINARIES - profit_cost = subtotal_before_profit * self.PROFIT_MARGIN - - subtotal_before_vat = subtotal_before_profit + contingency_cost + preliminaries_cost + profit_cost - - vat_cost = subtotal_before_vat * self.VAT_RATE - - total_cost = subtotal_before_vat + vat_cost + total_including_vat = material["total_cost"] * wall_area if is_extraction_and_refill: - # bump up the cost of the work - total_cost = total_cost + CAVITY_EXTRACTION_COST * wall_area + total_including_vat = CAVITY_EXTRACTION_COST * wall_area # Additional 2 days work - labour_hours = labour_hours + (2 * 8) - labour_days = labour_days + 2 + labour_hours += + (2 * 8) + labour_days += + 2 + + total_excluding_vat = total_including_vat / (1 + self.VAT_RATE) + vat_cost = total_including_vat - total_excluding_vat return { - "total": total_cost, - "subtotal": subtotal_before_vat, + "total": total_including_vat, + "subtotal": total_excluding_vat, "vat": vat_cost, - "contingency": contingency_cost, - "preliminaries": preliminaries_cost, - "material": base_material_cost, - "profit": profit_cost, "labour_hours": labour_hours, - "labour_cost": labour_cost, "labour_days": labour_days } diff --git a/recommendations/WallRecommendations.py b/recommendations/WallRecommendations.py index 1c483bff..69bfdfb4 100644 --- a/recommendations/WallRecommendations.py +++ b/recommendations/WallRecommendations.py @@ -511,7 +511,7 @@ class WallRecommendations(Definitions): sap_points = ewi_non_invasive_recommendations.get("sap_points", None) survey = ewi_non_invasive_recommendations.get("survey", False) - + already_installed = ( "external_wall_insulation" in self.property.already_installed