diff --git a/domain/sap10_calculator/rdsap/cert_to_inputs.py b/domain/sap10_calculator/rdsap/cert_to_inputs.py index cd68d5099..ecb72917c 100644 --- a/domain/sap10_calculator/rdsap/cert_to_inputs.py +++ b/domain/sap10_calculator/rdsap/cert_to_inputs.py @@ -7698,9 +7698,16 @@ def _fuel_cost( if main_2_fuel_code is not None else main_1_high_rate_gbp_per_kwh ) + # When DHW is supplied by a community heat network (WHC 901/902/914 on a + # heat-network main), the network heat — space AND water — bills at the + # main's Table-12 heat-network rate, NOT the cert-lodged HW fuel (which + # Elmhurst defaults to "Mains gas"). Mirror the .173 inherit already applied + # on the legacy/off-peak HW-rate paths (`_hot_water_fuel_cost_gbp_per_kwh`) + # into this §10a STANDARD-tariff path, which is the one that drives (255)/SAP. water_high_rate_gbp_per_kwh = ( - table_32_unit_price_p_per_kwh(water_heating_fuel_code) - * _PENCE_TO_GBP + _fuel_cost_gbp_per_kwh(main, prices) + if _is_community_heating_hw_from_main(epc) + else table_32_unit_price_p_per_kwh(water_heating_fuel_code) * _PENCE_TO_GBP ) # Secondary fuel cost: route through the cert's `secondary_fuel_type` # when lodged (e.g. mains-gas fire SAP code 605 → fuel 26 → Table 32