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

+27 -3
View File
@@ -181,15 +181,37 @@ JOIN dbo.PartnerPreis pp ON pp.IDPartnerPreisKategorie_FS=pk.IDPartnerPreisKateg
WHERE pk.IDAdresse_FS=@HotelAddressId AND pk.IDArtPartnerPreisCode_FS=@PriceCode
AND pk.IDArtVerpflegung_FS=@BoardId AND pk.EK_VK='VK'
AND pp.IDPartnerSaisonTafel_FS=@SaisonTafelId AND pp.Naechte=@Nights;
-- room availability (flat, reproducible)
-- room allotment (remaining = allotment − bookings, computed by BusPro; see below)
SELECT IDZimmer_FS,Anzahl,BuchungsStatus FROM dbo.PartnerKontingent
WHERE IDAdresse_FS=@HotelAddressId AND IDZimmer_FS=@ZimmerartId
AND TerminVon<=@Abreise AND TerminBis>=@Anreise;
```
- V: `EK_VK` = `EK` purchase / `VK` sale. **Always filter `VK`** for customer prices.
- V: `PartnerKontingent.Anzahl` IS the available room count. Gate with `BuchungsStatus`
(`''` bookable, `S` stop, `A` on request).
- V 2026-11-11: `PartnerKontingent.Anzahl` is the room **allotment**, not what is left
(hotel 163113, room type 2366: `Anzahl=6` while the export reported `verfuegbar="1"`).
BusPro computes the remaining count; read it from the export, not from this table. Gate with
`BuchungsStatus` (`''` bookable, `S` stop, `A` on request).
- V 2026-11-11: **pooled room contingents.** `PartnerZimmer.IDPartnerZimmer_FS_KontiAus`
points at the `PartnerZimmer` (same hotel) whose contingent a room type uses; `0` = own.
Used for selling one room at several occupancies ("Unterbelegung"): at hotel 163113 room
types 2367–2369 (7/6/5 pax) point at `PartnerZimmer` 8709 (2366, 8 pax). Only the parent
has `PartnerKontingent` rows; the export reports the parent's remaining count on every room
of the pool. The link is per hotel × room type (the same `Zimmerart` ids recur at other
hotels), and room codes do not reveal it. `Zimmerart.Teilzimmer`/`TeilzimmerAus` were 0 for
all four rooms and are not this link.
```sql
-- room type → room type owning its contingent, one hotel
SELECT pz.IDZimmerart_FS, COALESCE(m.IDZimmerart_FS, pz.IDZimmerart_FS) AS PoolZimmerart
FROM dbo.PartnerZimmer pz
LEFT JOIN dbo.PartnerZimmer m ON m.IDPartnerZimmer = pz.IDPartnerZimmer_FS_KontiAus
WHERE pz.IDAdresse_FS = @HotelAddressId;
```
- V 2026-11-11: BusPro's booking check does not sum a booking's rooms per pool. One booking with two room
types of one pool is accepted against a remaining count of 1 and drives it to −1
(2026-11-11, travel 1591, rooms 2366 + 2367).
- A: `PartnerZimmer.PreisJeZimmer` flags per-room vs per-person. Observed booking
responses returned the room price **per person** — check the flag before multiplying.
- Service availability is a different, harder problem — see A10.
@@ -326,6 +348,8 @@ guides · `Kalkulation*`/`VorplanungRaster*` costing and pre-planning.
- `BuchungTNZuschlag` holds the departure surcharge. → `ArtZuschlag` has no such entry (A7).
- `sys.objects.create_date` shows when a table was added. → Every object reported the same
date: that of the last DB restore. Use `modify_date` after the restore instead.
- `PartnerKontingent.Anzahl` is the remaining room count. → Hotel 163113, room type 2366:
`Anzahl=6` against export `verfuegbar="1"` on the same day (A6). It is the allotment.
# A12. Maintenance