Skip to content

[billing] Nightly cap changes apply retroactively to the whole month #32

Description

@MrTig-afk

Problem. api/services/billing_service.py:recompute_invoices reads venues.nightly_cap_weekday/weekend at run time and recomputes the whole current month from scratch each run. An admin changing a cap mid-month therefore re-prices already-played nights at the new cap — retroactive, potentially disputable.

Fix. Snapshot the applicable cap onto each line item (or per period) at play/finalize time and recompute using the snapshotted value, so past nights keep the cap that was in force then.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions