Table ph_booking
Description:
make sure charging works for a group or an individual; this summarises all the hospitality services that have to be paid for; also useful for planning meals in the kitchen and room preparation
PRIMARY KEY
ph_key_i
integer NOT NULL
Surrogate Primary Key; required because there can be several bookings per room and per group

p_contact_key_n
bigint
the partner key of the visitor or the partner key of the organisation or group that is visiting; each room allocation can refer to the individual guest as well; this can be different from the partner that is charged in the invoice p_partner
a_ledger_number_for_invoice_i
integer default: 0
The ledger number that is needed for the invoice a_ar_invoice
a_ar_invoice_key_i
integer
refers to an offer which will later be the invoice a_ar_invoice
ph_number_of_adults_i
integer default: 0
This is a booking for n adults
ph_number_of_children_i
integer default: 0
This is a booking for n children
ph_number_of_breakfast_i
integer default: 0
The people that are part of this booking had n breakfasts; also useful for the kitchen
ph_number_of_lunch_i
integer default: 0
The people that are part of this booking had n lunches
ph_number_of_supper_i
integer default: 0
The people that are part of this booking had n suppers
ph_number_of_linen_needed_i
integer default: 0
The number of linen that have been provided for this booking
ph_confirmed_d
date
this should be set to the date when the booking has been confirmed; required for early booking discounts
ph_in_d
date NOT NULL
ph_out_d
date
ph_time_arrival_i
integer
ph_time_departure_i
integer
ph_notes_c
varchar (1000)
Add notes about the stay or special requests by the guest
s_date_created_d
date default: CURRENT_DATE
The date the record was created.
s_created_by_c
varchar (20)
User ID of who created this record. s_user
s_date_modified_d
date
The date the record was modified.
s_modified_by_c
varchar (20)
User ID of who last modified this record. s_user
s_modification_id_t
timestamp default: CURRENT_TIMESTAMP
This identifies the current version of the record.


FOREIGN KEY
ph_booking_fk1: p_contact_key_n => p_partner
ph_booking_fk2: a_ledger_number_for_invoice_i;a_ar_invoice_key_i => a_ar_invoice
ph_booking_fkcr: s_created_by_c => s_user
ph_booking_fkmd: s_modified_by_c => s_user


REFERENCED BY
ph_room_booking