docs: document pooled room contingents

This commit is contained in:
fromme committed 2026-11-11 16:35:49 +01:00
1 parent 0b0286787b
commit 5942ecf340
2 files changed
+37 -9

No files matched your search

+10 -6
View File
@@ -261,15 +261,18 @@ WHERE pk.IDAdresse_FS = @HotelAddressId
> customer price. `PartnerZimmer.PreisJeZimmer` flags per-room vs. per-person pricing.
```sql
-- availability (XML 'verfuegbar') — VALIDATED: = PartnerKontingent.Anzahl for the
-- (hotel, room-type, date-span). IDZimmer_FS = the XML idbuspro_zimmer (a Zimmerart).
-- Sample: IDAdresse_FS=224923, IDZimmer_FS=1413, 2026-12-11 → Anzahl=25 = XML verfuegbar.
-- allotment behind XML 'verfuegbar' for the (hotel, room-type, date-span).
-- IDZimmer_FS = the XML idbuspro_zimmer (a Zimmerart). Anzahl is the allotment, NOT what is
-- left: 2026-11-11, hotel 163113 / 2366 → Anzahl=6 against XML verfuegbar=1. The earlier
-- sample 224923 / 1413 / 2026-12-11 (Anzahl=25 = verfuegbar) presumably had no bookings yet.
SELECT IDZimmer_FS, Anzahl, BuchungsStatus FROM dbo.PartnerKontingent
WHERE IDAdresse_FS = @HotelAddressId
AND IDZimmer_FS = @ZimmerartId -- the room type (XML idbuspro_zimmer)
AND TerminVon <= @Abreise AND TerminBis >= @Anreise;
```
> `verfuegbar` is a **flat column** (`PartnerKontingent.Anzahl`) — reproducible by SQL.
> `verfuegbar` is **computed** by BusPro: allotment minus bookings (see
> `live-api-queries.md`), and for a pooled room type the parent's figure
> (`PartnerZimmer.IDPartnerZimmer_FS_KontiAus`, `buspro-database-reference.md` A6).
> Gate it with `BuchungsStatus` (`''` bookable, `S` stop, `A` on-request).
> `<abpreis>` (the headline "from" price) is still **computed** (cheapest valid room +
> mandatory services) — recompute in the proxy from the per-room prices above.
@@ -298,8 +301,9 @@ ORDER BY gs.Position, sg.Position;
4. ~~**Partner room pricing**~~ — ✅ fully validated end-to-end: room `1413` (MBZ) →
code `38` → category `9478` → season `15420` × `Naechte=2` × `VK` × schema `1` =
**`269,00`**. (XML `abpreis 289,00` = room + mandatory services = computed.)
5. ~~**`verfuegbar`**~~ — ✅ flat: `PartnerKontingent.Anzahl` for `(IDAdresse_FS, IDZimmer_FS,
date-span)`; `1413 / 2026-12-11 → 25`. `<abpreis>` remains computed (recompute in proxy).
5. **`verfuegbar`** — computed, not flat (corrected 2026-11-11): `PartnerKontingent.Anzahl`
is the allotment; `1413 / 2026-12-11 → 25` presumably matched because nothing was booked
yet. `<abpreis>` remains computed (recompute in proxy).
6. ~~**Minimum-services filter**~~ — ✅ defined: "included services" =
(A2a) `Leistung`s with sales price `0.00` (schema 1) **+** (A2b) selection items from
the hardcoded "Leistungen" `Selektionsgruppenstamm` ids, merged into one plain list.