utilities/backend
jtricerolph 67dd943cdb Convert gas meter volume readings to kWh for cost calculations
Gas meters are read in raw volume (ft3 on our imperial meter, m3 on
newer metric ones), never kWh — but tariff rates and CCL/RAB levy are
all p/kWh. Add gas_volume_unit + gas_calorific_value to meters, and
convert reading deltas to kWh in cost-calc.js using the standard
UK gas-billing formula (matches the exact calculation printed on
supplier invoices) before any cost math runs.

Also fixes meter/readings pages showing raw gas dial readings
mislabeled as "kWh" — they now show the actual physical unit
(ft³/m³) via a new reading_unit_label, while computed consumption
stays correctly labeled kWh.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-28 13:25:03 +00:00
..
src Convert gas meter volume readings to kWh for cost calculations 2026-07-28 13:25:03 +00:00
Dockerfile Initial commit — utilities app (meter readings, tariffs, cost tracking) 2026-07-26 17:33:42 +00:00
package.json Initial commit — utilities app (meter readings, tariffs, cost tracking) 2026-07-26 17:33:42 +00:00