Primary Key Field Type
 ID uniqueidentifier

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) CONVERT(bigint, TS) Numeric representation of the timestamp.
 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 The date the payment was made with time zone awareness.
 DONOTRECONCILE bit   Default = 0
 DEPOSITED bit   Default = 0

Foreign Key Field Type Null Notes Description
 SALESORDERID uniqueidentifier   SALESORDER.ID The sales order record for this payment.
 PAYMENTID uniqueidentifier   FINANCIALTRANSACTION.ID The payment record for this sales order.
 ADDEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.
 CHANGEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.
 RECONCILIATIONID uniqueidentifier RECONCILIATION.ID The reconciliation record for this payment.
 APPUSERID uniqueidentifier APPUSER.ID The application user who entered the payment.

Index Name Field(s) Unique Primary Clustered
 IX_SALESORDERPAYMENT_APPUSERID APPUSERID      
 IX_SALESORDERPAYMENT_DATEADDED DATEADDED    
 IX_SALESORDERPAYMENT_DATECHANGED DATECHANGED      
 IX_SALESORDERPAYMENT_PAYMENTID PAYMENTID      
 IX_SALESORDERPAYMENT_RECONCILIATIONID RECONCILIATIONID      
 IX_SALESORDERPAYMENT_SALESORDERID SALESORDERID      
 PK_SALESORDERPAYMENT ID  

Trigger Name Description
 TR_SALESORDERPAYMENT_AUDIT_UPDATE
 TR_SALESORDERPAYMENT_AUDIT_DELETE

Entity-Relationship diagram of this table