SALESORDERITEMDONATION

Stores data for a donation on a sales order.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
AMOUNT money Default = 0 The amount for given donation.
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.
ECARDSDATA xml yes XML data held for BBNC's eCards.
DESIGNATIONNAME nvarchar(512) Default = '' Name of designation at time of sale.
ISZEROAMOUNTTRANSACTION bit Default = 0 If the transaction equals zero amount intentionally, set equal to true. Default value is equal to false.

Foreign Keys

Foreign Key Field Type Null Notes Description
ID uniqueidentifier SALESORDERITEM.ID Primary Key.
DESIGNATIONID uniqueidentifier DESIGNATION.ID FK to DESIGNATION table.
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
REVENUESPLITID uniqueidentifier yes FINANCIALTRANSACTIONLINEITEM.ID FK to REVENUESPLIT table

Indexes

Index Name Fields Unique Primary Clustered
IX_SALESORDERITEMDONATION_DATEADDED DATEADDED yes
IX_SALESORDERITEMDONATION_DATECHANGED DATECHANGED
PK_SALESORDERITEMDONATION ID yes yes
UIX_SALESORDERITEMDONATION_REVENUESPLITID REVENUESPLITID yes

Triggers

Trigger Name Description
TR_SALESORDERITEMDONATION_AUDIT_UPDATE
TR_SALESORDERITEMDONATION_AUDIT_DELETE