CREDITORDERPAYMENTMAP

Stores the mapping of credit payments to order payments and vice-versa

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
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.

Foreign Keys

Foreign Key Field Type Null Notes Description
CREDITPAYMENTID uniqueidentifier CREDITPAYMENT.ID The credit payment record for this mapping.
ORDERPAYMENTID uniqueidentifier FINANCIALTRANSACTION.ID The order payment record for this mapping.
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.

Indexes

Index Name Fields Unique Primary Clustered
IX_CREDITORDERPAYMENTMAP_CREDITPAYMENTID CREDITPAYMENTID
IX_CREDITORDERPAYMENTMAP_DATEADDED DATEADDED yes
IX_CREDITORDERPAYMENTMAP_DATECHANGED DATECHANGED
IX_CREDITORDERPAYMENTMAP_ORDERPAYMENTID ORDERPAYMENTID
PK_CREDITORDERPAYMENTMAP ID yes yes

Triggers

Trigger Name Description
TR_CREDITORDERPAYMENTMAP_AUDIT_UPDATE
TR_CREDITORDERPAYMENTMAP_AUDIT_DELETE