Skip to content

Store the rate each booking paid per night #85

Closed as not planned
Closed as not planned

Description

@selvarajuv

Blocked by: #84

Problem

A night is sold at several prices in the weeks before it, but we only know its average from total revenue ÷ rooms sold. We can't see when the rate was raised, or whether bookings kept coming afterwards.

Goal

For every booked night we know the rate plan and price the guest paid, so we can see how a night's price changed while it filled up.

Scope

  • A table with one row per booking per night: booking reference, stay date, rate plan code, price (nett).
  • A parser for Daily Rate Analysis (e.g. BAR_RO 242.19 split into rate plan and price).
  • Link each row to its booking from the bookings table.
  • Models, repository and services through every layer; idempotent upserts.
  • An Alembic migration that applies and rolls back.

Considerations

  • Check whether this report's prices are nett or gross and store nett.
  • Rows whose booking isn't in the bookings table (e.g. made before the export range) should still load and be flagged, not fail the file.

Acceptance criteria

  • A sample file loads, with rate plan and price split correctly.
  • Loading the same file twice doesn't add rows.
  • Each row can be joined to its booking where one exists.
  • Tests cover parsing and upserts.

Activity

  1. added
    featureIntroduces a new and complete feature
    hotel dataGuestline PMS exports, parsers, upload endpoint and checks
    on Oct 21, 2026
  2. selvarajuv commented on Oct 27, 2026

    @selvarajuv
    CollaboratorAuthor

    Closing: decision 0037 dropped the Daily Rate Analysis report, so there's no per-booking-night price to store. #104 now trains on each booking's nett ADR from Daily New Reservations (#84) instead.

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

    featureIntroduces a new and complete featurehotel dataGuestline PMS exports, parsers, upload endpoint and checks

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions