← Changelog
v2.8Feature21 April 2026

Metered billing + dark mode + Odoo fiscal

Stripe metered billing with threshold or cycle close. Odoo issues the Spanish fiscal invoice automatically. Dark mode across the app with no hydration flash.

Major changes

  • Real metered billing: subscriptions + bookings + extras accumulate in a rolling window. When threshold (€500 default) or cycle close (7 days default) hits, Stripe issues an invoice and charges the stored card. Race-safe via pg advisory locks.
  • Per-tenant pricing rule: each organisation can have distinct rates for the 5 billable items (greenfee, buggy, teetime, extra, modificationfee). FLAT or PERCENT with min/max.
  • Atomic trial counter: first N bookings are free (default 50). The counter is atomically reserved to prevent TOCTOU.
  • Odoo XML-RPC: when Stripe pays, Odoo idempotently issues the Spanish fiscal invoice (matching by external id, falling back to email).
  • Tenant billing UI at /dashboard/billing: real-time open credit, countdown to next close, payment method via Stripe Customer Portal, invoice history with PDF + Odoo link.
  • Dark mode: light / dark / system with inline pre-hydration script (no flash). CSS vars per surface. Toggle in the sidebar footer.