Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments |
|---|---|---|---|---|---|---|---|---|
| date_ref | date | 13 | fn_system_date() |
|
|
|||
| total_rooms | int2 | 5 | 0 |
|
|
Total room in hotel (before deducted from OOI) |
||
| ooo_rooms | int2 | 5 | 0 |
|
|
|||
| oos_rooms | int2 | 5 | 0 |
|
|
|||
| ooi_rooms | int2 | 5 | 0 |
|
|
|||
| occ_rooms | int2 | 5 | 0 |
|
|
|||
| occ_adult | int2 | 5 | 0 |
|
|
|||
| occ_child | int2 | 5 | 0 |
|
|
|||
| occ_infant | int2 | 5 | 0 |
|
|
|||
| hsu_rooms | int2 | 5 | 0 |
|
|
|||
| hsu_adult | int2 | 5 | 0 |
|
|
|||
| hsu_child | int2 | 5 | 0 |
|
|
|||
| hsu_infant | int2 | 5 | 0 |
|
|
|||
| comp_rooms | int2 | 5 | 0 |
|
|
|||
| comp_adult | int2 | 5 | 0 |
|
|
|||
| comp_child | int2 | 5 | 0 |
|
|
|||
| comp_infant | int2 | 5 | 0 |
|
|
|||
| individual_rooms | int2 | 5 | 0 |
|
|
|||
| individual_adult | int2 | 5 | 0 |
|
|
|||
| individual_child | int2 | 5 | 0 |
|
|
|||
| individual_infant | int2 | 5 | 0 |
|
|
|||
| individual_revenue | t_money | 15,2 | 0 |
|
|
REVENUE_CALC_TYPE = 1 basis, individual bookings. Room only but still GROSS: included meals and rate inclusions are removed, service charge and tax are NOT. Source: SUM(sp_rate_schedule_breakdown.room). For the service/tax-free figure see individual_revenue_room_net. |
||
| individual_breakdown | jsonb | 2147483647 | √ | null |
|
|
||
| group_rooms | int2 | 5 | 0 |
|
|
|||
| group_adult | int2 | 5 | 0 |
|
|
|||
| group_child | int2 | 5 | 0 |
|
|
|||
| group_infant | int2 | 5 | 0 |
|
|
|||
| group_revenue | t_money | 15,2 | 0 |
|
|
REVENUE_CALC_TYPE = 1 basis, group bookings. See individual_revenue. |
||
| group_breakdown | jsonb | 2147483647 | √ | null |
|
|
||
| arrival_rooms | int2 | 5 | 0 |
|
|
|||
| arrival_adult | int2 | 5 | 0 |
|
|
|||
| arrival_child | int2 | 5 | 0 |
|
|
|||
| arrival_infant | int2 | 5 | 0 |
|
|
|||
| departure_rooms | int2 | 5 | 0 |
|
|
|||
| departure_adult | int2 | 5 | 0 |
|
|
|||
| departure_child | int2 | 5 | 0 |
|
|
|||
| departure_infant | int2 | 5 | 0 |
|
|
|||
| day_used_qty | int2 | 5 | 0 |
|
|
|||
| day_used_adult | int2 | 5 | 0 |
|
|
|||
| day_used_child | int2 | 5 | 0 |
|
|
|||
| day_used_infant | int2 | 5 | 0 |
|
|
|||
| day_used_revenue | t_money | 15,2 | 0 |
|
|
REVENUE_CALC_TYPE = 1 basis, day-use rooms. Written from the day-use breakdown in sp_get_recapitulate since V20260918.10.4; every row written before that is 0 because the breakdown it read was filtered to in-house guests, who a day-use guest is not by end-day. |
||
| booking_rooms | int2 | 5 | 0 |
|
|
|||
| booking_adult | int2 | 5 | 0 |
|
|
|||
| booking_child | int2 | 5 | 0 |
|
|
|||
| booking_infant | int2 | 5 | 0 |
|
|
|||
| walk_in_rooms | int2 | 5 | 0 |
|
|
|||
| walk_in_adult | int2 | 5 | 0 |
|
|
|||
| walk_in_child | int2 | 5 | 0 |
|
|
|||
| walk_in_infant | int2 | 5 | 0 |
|
|
|||
| early_checkout | int2 | 5 | 0 |
|
|
|||
| extended_stay | int2 | 5 | 0 |
|
|
|||
| canceled_rooms | int2 | 5 | 0 |
|
|
|||
| canceled_adult | int2 | 5 | 0 |
|
|
|||
| canceled_child | int2 | 5 | 0 |
|
|
|||
| canceled_infant | int2 | 5 | 0 |
|
|
|||
| no_show_rooms | int2 | 5 | 0 |
|
|
|||
| no_show_adult | int2 | 5 | 0 |
|
|
|||
| no_show_child | int2 | 5 | 0 |
|
|
|||
| no_show_infant | int2 | 5 | 0 |
|
|
|||
| tomorrow_expected_arrival | int2 | 5 | 0 |
|
|
|||
| tomorrow_expected_departure | int2 | 5 | 0 |
|
|
|||
| no_show_rooms_partial | int2 | 5 | 0 |
|
|
|||
| no_show_adult_partial | int2 | 5 | 0 |
|
|
|||
| no_show_child_partial | int2 | 5 | 0 |
|
|
|||
| no_show_infant_partial | int2 | 5 | 0 |
|
|
|||
| individual_revenue_total | t_money | 15,2 | 0 |
|
|
REVENUE_CALC_TYPE = 0 basis, individual bookings. Full nightly rate, GROSS: includes the meals/inclusions priced into the rate AND service charge AND tax. Source: SUM(sp_rate_schedule_breakdown.rate_amount) = SUM(registration_rates.room_rate). “_total” here means “the whole rate”, NOT “individual + group” – for that see total_revenue_rate_gross. |
||
| group_revenue_total | t_money | 15,2 | 0 |
|
|
REVENUE_CALC_TYPE = 0 basis, group bookings. See individual_revenue_total. |
||
| day_used_revenue_total | t_money | 15,2 | 0 |
|
|
REVENUE_CALC_TYPE = 0 basis, day-use rooms. See day_used_revenue. |
||
| individual_revenue_room_net | t_money | 15,2 | √ | null |
|
|
REVENUE_CALC_TYPE = 2 basis, individual bookings. Room only and NET: every itemizer on the room-charge department (service, tax, local tax, surcharge) is removed. Source: SUM(sp_rate_schedule_breakdown.room_net) = SUM of the BASE_PRICE entries that sp_post_transaction freezes into transactions.itemizers, so it reconciles with itemizer_summary. NULL means the backfill has not reached this date; readers use COALESCE(individual_revenue_room_net, individual_revenue), i.e. they degrade to the type-1 basis rather than reporting zero. Backfill with sp_backfill_revenue_room_net(). “NET” here means net of service/tax – NOT “net of void” (the meaning of the *_net_amt / *_net_qty columns in sp_trial_balance and rpc.insight_daily_summary), and NOT the legacy Fromas desktop “Net Revenue”, which meant the full rate (type 0). |
|
| group_revenue_room_net | t_money | 15,2 | √ | null |
|
|
REVENUE_CALC_TYPE = 2 basis, group bookings. See individual_revenue_room_net. |
|
| day_used_revenue_room_net | t_money | 15,2 | √ | null |
|
|
REVENUE_CALC_TYPE = 2 basis, day-use rooms. See individual_revenue_room_net. |
|
| total_revenue_rate_gross | t_money | 15,2 | √ | (((individual_revenue_total)::numeric + (group_revenue_total)::numeric) + (day_used_revenue_total)::numeric) |
|
|
REVENUE_CALC_TYPE = 0 basis for the whole day: individual + group + day use, all on the Gross Rate basis (room, meals and inclusions). Day use was added in V20260918.10.4; before that the three total_revenue_* columns covered overnight rooms only. |
|
| total_revenue_room_gross | t_money | 15,2 | √ | (((individual_revenue)::numeric + (group_revenue)::numeric) + (day_used_revenue)::numeric) |
|
|
REVENUE_CALC_TYPE = 1 basis for the whole day: individual + group + day use, all on the Gross Room basis (room only, service and tax still included). |
|
| total_revenue_room_net | t_money | 15,2 | √ | (((COALESCE(individual_revenue_room_net, individual_revenue))::numeric + (COALESCE(group_revenue_room_net, group_revenue))::numeric) + (COALESCE(day_used_revenue_room_net, day_used_revenue))::numeric) |
|
|
REVENUE_CALC_TYPE = 2 basis for the whole day: individual + group + day use, all on the Net Room basis. Each bucket degrades to its type-1 column when the net figure was never derived, so a non-zero value here does not prove the row holds net figures – test individual_revenue_room_net IS NULL for that. |
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| pk_recapitulate | Primary key | Asc | date_ref |
