diff --git a/domain/sap10_calculator/rdsap/cert_to_inputs.py b/domain/sap10_calculator/rdsap/cert_to_inputs.py index d203776e9..9bfa07707 100644 --- a/domain/sap10_calculator/rdsap/cert_to_inputs.py +++ b/domain/sap10_calculator/rdsap/cert_to_inputs.py @@ -2029,7 +2029,39 @@ def _standing_charges_total_gbp( water_heating_fuel_code: Optional[int], tariff: Tariff, ) -> float: - raise NotImplementedError + """Total annual standing charge (£/yr) for worksheet (251) — the single + source of truth for how the heat-network and fuel-based standing charges + compose. + + SAP 10.2 §C6 (PDF p.54-55) settles the composition, and phrases its two + cases deliberately differently: + + - Space heating on a heat network → "the TOTAL standing charge IS the + normal heat network standing charge" — a REPLACEMENT. The dwelling's own + fuel standing does not apply on top (see + `_heat_network_standing_charge_gbp`). + - DHW-only heat network → "INCLUDE one-half of the normal heat network + standing charge IN the calculation of fuel costs unless the space heating + is also a heat network" — ADDITIVE. Only the full case is worded as a + total, so the half stacks on whatever Table 12 note (a) already charges + the dwelling for its own space-heating fuel (e.g. £24 off-peak electric + for a storage-heater main → £84). + + The DHW-only half keys off the WATER heating code (950 / 951 / 952), not + the space main: the space main is by definition NOT a network on this + branch, so gating on it (as the £120 branch does) can never fire here. + """ + network_standing = _heat_network_standing_charge_gbp(epc, main) + if network_standing is not None: + return network_standing + fuel_standing = additional_standing_charges_gbp( + main_fuel_code=main_fuel_code, + water_heating_fuel_code=water_heating_fuel_code, + tariff=tariff, + ) + if epc.sap_heating.water_heating_code in _WATER_HEAT_NETWORK_ONLY_CODES: + return fuel_standing + _HEAT_NETWORK_STANDING_CHARGE_GBP / 2.0 + return fuel_standing def _main_heating_efficiency(epc: EpcPropertyData) -> float: