utilities/backend
jtricerolph f1ce0f06d8 Fix TOU rate-window mismatch and enforce fallback-split validation
Rate windows were matched by substring (label.includes(key)), so
overlapping labels like "Day"/"Weekday" could silently cross-match to
the wrong rate. Switched to an exact match.

The "split must total 100%" check was advisory-only in the UI and
never validated server-side, letting a tariff save with a split that
doesn't sum to 100% and permanently mis-cost that meter's usage.
Enforced on both the API (POST/PATCH /api/tariffs) and the Save
button.

Also aligned the app's portal category to 'Hotel' (already correct in
auth/src/db.js) here and in stack-init/install-stack.sh, which had
both drifted to 'Operations'.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-28 12:59:19 +00:00
..
src Fix TOU rate-window mismatch and enforce fallback-split validation 2026-07-28 12:59:19 +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