Table openpetra_trunk.public.ph_booking
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

Generated by
SchemaSpy
Legend: SourceForge.net
Primary key columns
Columns with indexes
Implied relationships
Excluded column relationships
< n > number of related tables
 
Column Type Size Nulls Auto Default Children Parents Comments
ph_key_i int4 10
ph_room_booking.ph_booking_key_i ph_room_booking_fk1 R
Surrogate Primary Key; required because there can be several bookings per room and per group
p_contact_key_n numeric 10  √  null
p_partner.p_partner_key_n ph_booking_fk1 R
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
a_ledger_number_for_invoice_i int4 10  √  0
a_ar_invoice.a_ledger_number_i ph_booking_fk2 R
The ledger number that is needed for the invoice
a_ar_invoice_key_i int4 10  √  null
a_ar_invoice.a_key_i ph_booking_fk2 R
refers to an offer which will later be the invoice
ph_number_of_adults_i int4 10  √  0 This is a booking for n adults
ph_number_of_children_i int4 10  √  0 This is a booking for n children
ph_number_of_breakfast_i int4 10  √  0 The people that are part of this booking had n breakfasts; also useful for the kitchen
ph_number_of_lunch_i int4 10  √  0 The people that are part of this booking had n lunches
ph_number_of_supper_i int4 10  √  0 The people that are part of this booking had n suppers
ph_number_of_linen_needed_i int4 10  √  0 The number of linen that have been provided for this booking
ph_confirmed_d date 13  √  null this should be set to the date when the booking has been confirmed; required for early booking discounts
ph_in_d date 13
ph_out_d date 13  √  null
ph_time_arrival_i int4 10  √  null
ph_time_departure_i int4 10  √  null
ph_notes_c varchar 1000  √  null Add notes about the stay or special requests by the guest
s_date_created_d date 13  √  ('now'::text)::date
s_created_by_c varchar 20  √  null
s_user.s_user_id_c ph_booking_fkcr R
s_date_modified_d date 13  √  null
s_modified_by_c varchar 20  √  null
s_user.s_user_id_c ph_booking_fkmd R
s_modification_id_c varchar 150  √  null

Table contained 0 rows at Do Nov 10 18:00 MEZ 2011

Indexes:
Column(s) Type Sort Constraint Name
ph_key_i Primary key Asc ph_booking_pk
p_contact_key_n Performance Asc inx_ph_booking_fk1_key2
a_ledger_number_for_invoice_i + a_ar_invoice_key_i Performance Asc/Asc inx_ph_booking_fk2_key3
s_created_by_c Performance Asc inx_ph_booking_fkcr_key4
s_modified_by_c Performance Asc inx_ph_booking_fkmd_key5
ph_key_i Must be unique Asc inx_ph_booking_pk1
ph_key_i Performance Asc inx_ph_room_booking_fk1_ref0

Close relationships  within of separation: