Bug #2933
Report: Electricity Bill vs Energy Consumed (Cost per Unit) — station-wise & all-stations, month/year
Description
Purpose
A new operational report that compares, per period, the actual electricity bill (₹) paid for a station against the energy consumed/delivered (kWh) at that station — so finance/ops can see the real cost of electricity vs the units delivered and spot anomalies (over-billing, leakage, meter issues, tariff changes). Because the two are in different units (₹ vs kWh), the report also derives an Average Cost per Unit (₹/kWh), which is the headline, human-readable metric.
Data sources (no new data entry — reuses monthly closing data)
Electricity Bill (₹): the actual "Electricity Expense" ledger amount entered during monthly closing (station_monthly_revenue_versioned_snapshots → ..._ledger_amounts, ledger = Electricity Expense). One active snapshot per station×month.
Energy Consumed (kWh): the same snapshot's total_energy_kwh (keeps bill & energy on the exact same period/basis).
Views / filters
Granularity: Month or Year.
Station filter: optional — one station, or all stations (no selection needed).
Period filter: year, and optional single month.
All-stations combined: per-period totals across every station, plus a grand total.
Columns (user-friendly)
Column Meaning
Period e.g. "Aug 2026" (month) / "2026" (year)
Station station name (or "All Stations" in the combined rows)
Energy Consumed (kWh) units delivered in the period
Electricity Bill (₹) actual bill paid (from monthly closing)
Avg Cost per Unit (₹/kWh) Electricity Bill ÷ Energy Consumed — the key comparison metric
Sessions charging sessions in the period
Bill Recorded? Yes/No — whether the electricity bill was entered for that month's closing
Notes
"Difference" between bill and energy is expressed as ₹/kWh (units differ, so a straight subtraction is not meaningful).
If a month's closing has no electricity ledger entry, bill = ₹0 and "Bill Recorded? = No" (so users know it's missing, not truly zero).
Access: same permission as Station Monthly Revenue (stations.monthly_revenue.view).
Updated by Shreya Agarwal about 4 hours ago
Today, I completed the development of the Electricity Cost Analytics report from the frontend side. This report compares the actual electricity bill (₹) paid for a station against the energy consumed (kWh) and derives the average cost per unit (₹/kWh). The report includes station-wise and all-stations views with month/year granularity filters.
implemented the complete UI with station, year, and month filters, and integrated the report data from the backend API. The report displays key metrics including Energy Consumed, Bill Energy, Difference, Electricity Bill, and Cost Per Kwh in a clean table format. I ensured the data displays exactly as received from the API without any sorting, removed unnecessary components like stat cards and action columns, and updated the info modal with proper documentation. The page is now fully functional and follows the same design pattern as the existing project report.