RESERVATIONSECURITYDEPOSITPAYMENT

Stored payments for a reservation security deposit.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
AMOUNTTENDERED money Default = 0 The amount tendered for this payment.
AMOUNT money Default = 0 The actual amount of the payment.
CHANGEDUE money Default = 0 The change due for this payment.
PAYMENTDATEWITHTIMEOFFSET datetimeoffset yes The date the payment was made with time zone awareness.
DATEADDED datetime Default = getdate() Indicates the date this record was added.
DATECHANGED datetime Default = getdate() Indicates the date this record was last changed.
TS timestamp Timestamp.
TSLONG bigint (Computed) yes CONVERT(bigint, TS) Numeric representation of the timestamp.
DEPOSITED bit Default = 0

Foreign Keys

Foreign Key Field Type Null Notes Description
RESERVATIONID uniqueidentifier RESERVATION.ID The reservation record for this payment.
PAYMENTID uniqueidentifier FINANCIALTRANSACTION.ID The payment record for this security deposit.
APPUSERID uniqueidentifier yes APPUSER.ID The application user who entered the payment.
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
RECONCILIATIONID uniqueidentifier yes RECONCILIATION.ID The reconciliation record for this payment.

Indexes

Index Name Fields Unique Primary Clustered
IX_RESERVATIONSECURITYDEPOSITPAYMENT_APPUSERID APPUSERID
IX_RESERVATIONSECURITYDEPOSITPAYMENT_DATEADDED DATEADDED yes
IX_RESERVATIONSECURITYDEPOSITPAYMENT_DATECHANGED DATECHANGED
IX_RESERVATIONSECURITYDEPOSITPAYMENT_PAYMENTDATEWITHTIMEOFFSET PAYMENTDATEWITHTIMEOFFSET
IX_RESERVATIONSECURITYDEPOSITPAYMENT_PAYMENTID PAYMENTID
IX_RESERVATIONSECURITYDEPOSITPAYMENT_RECONCILIATIONID RECONCILIATIONID
IX_RESERVATIONSECURITYDEPOSITPAYMENT_RESERVATIONID RESERVATIONID
PK_RESERVATIONSECURITYDEPOSITPAYMENT ID yes yes

Triggers

Trigger Name Description
TR_RESERVATIONSECURITYDEPOSITPAYMENT_AUDIT_UPDATE
TR_RESERVATIONSECURITYDEPOSITPAYMENT_AUDIT_DELETE