SALESORDER (4.0SP20)

This table stores information pertaining to a sales order.

Primary Key
Primary Key Field Type

ID

uniqueidentifier

Foreign Key Fields
Foreign Key Field Type Null Notes Description

ADDEDBYID

uniqueidentifier

false

FK to CHANGEAGENT.

CHANGEDBYID

uniqueidentifier

false

FK to CHANGEAGENT.

CONSTITUENTID

uniqueidentifier

true

The constituent linked to the order.

REVENUEID

uniqueidentifier

true

The revenue item linked to the order.

DELIVERYMETHODID

uniqueidentifier

true

The delivery method used to deliver the tickets in this order

RECIPIENTID

uniqueidentifier

true

The constituent to recieve the order; contact in group sales

ADDRESSID

uniqueidentifier

true

The address used to deliver the order

PHONEID

uniqueidentifier

true

The phone number for the recipient

EMAILADDRESSID

uniqueidentifier

true

The email address for the recipient

APPUSERID

uniqueidentifier

true

The application user who entered the order

CONTACTRELATIONSHIPID

uniqueidentifier

true

Fields
Field Field Type Null Notes Description

TRANSACTIONDATE

datetime

true

The date of the order transaction.

STATUSCODE

tinyint

false

0

Status of the condition of the order.

COMMENTS

nvarchar(1000)

false

''

Remarks about this sales order.

CUSTOMIDENTIFIER

nvarchar(100)

false

''

User-definable custom identifier.

SEQUENCEID

int

false

Identity column used to increment the default lookupid.

DATEADDED

datetime

false

getdate()

Indicates the date this record was added.

DATECHANGED

datetime

false

getdate()

Indicates the date this record was last changed.

TS

timestamp

false

Timestamp.

TSLONG

bigint (Computed)

true

Numeric representation of the timestamp.

SALESMETHODTYPECODE

tinyint

false

0

The type of sales method.

SALESMETHODTYPE

nvarchar(13) (Computed)

true

Provides a translation for the 'SALESMETHODTYPECODE' field.

LOOKUPID

nvarchar(100) (Computed)

true

Unique identifer that supports user defined values as well as system generated values.

SAMEASPATRON

bit

false

0

Determines if delivery information is same as patron information

TRANSACTIONDATEWITHTIMEOFFSET

datetimeoffset

true

The date of the order transaction.

LASTRECALCULATIONDATE

datetime

true

The date of the last recalculation of taxes, fees, and discounts.

STATUS

nvarchar(10) (Computed)

true

Provides a translation for the 'STATUSCODE' field.

REFUNDSTATUS

int (Computed)

true

AMOUNT

money (Computed)

true

ITEMDISCOUNTSCALCULATED

bit

false

0

Indexes
Index Name Field(s) Unique Primary Clustered

IX_SALESORDER_ADDRESSID

ADDRESSID

False

False

False

IX_SALESORDER_APPUSERID

APPUSERID

False

False

False

IX_SALESORDER_CONSTITUENTID

CONSTITUENTID

False

False

False

IX_SALESORDER_CONTACTRELATIONSHIPID

CONTACTRELATIONSHIPID

False

False

False

IX_SALESORDER_DATEADDED

DATEADDED

False

False

False

IX_SALESORDER_DATECHANGED

DATECHANGED

False

False

False

IX_SALESORDER_EMAILADDRESSID

EMAILADDRESSID

False

False

False

IX_SALESORDER_PHONEID

PHONEID

False

False

False

IX_SALESORDER_RECIPIENTID

RECIPIENTID

False

False

False

IX_SALESORDER_REVENUEID

REVENUEID

False

False

False

IX_SALESORDER_SEQUENCEID

SEQUENCEID

False

False

True

IX_SALESORDER_TRANSACTIONDATE

TRANSACTIONDATE

False

False

False

PK_SALESORDER

ID

True

True

False

UC_SALESORDER_LOOKUPID

LOOKUPID

True

False

False

Triggers
Trigger Name Description

TR_SALESORDER_AUDIT_UPDATE

TR_SALESORDER_AUDIT_DELETE

TR_SALESORDER_UPDATE_TRANSACTIONDATETIMEWITHOFFSET

Referenced by
Referenced by Field

CMSUSERSALESORDER

SALESORDERID

CREDIT_EXT

SALESORDERID

CREDITITEM_EXT

SALESORDERID

DOCUMENTPRINTINGHISTORY

SALESORDERID

RESERVATION

ID

SALESORDERADJUSTABLEDISCOUNT

SALESORDERID

SALESORDERATTACHMENT

SALESORDERID

SALESORDERAVAILABLEDISCOUNTGROUPCOMBINATION

SALESORDERID

SALESORDERBBPAYTRANSACTION

SALESORDERID

SALESORDERCLEANUPERRORLOG

ID

SALESORDERDISCOUNTLIMITOVERRIDE

SALESORDERID

SALESORDERDISCOUNTSCENARIOCOMBINATION

SALESORDERID

SALESORDERFEEDELETED

SALESORDERID

SALESORDERITEM

SALESORDERID

SALESORDERITEMDISCOUNTOPTION

SALESORDERID

SALESORDERITEMSCENARIOSDONE

SALESORDERID

SALESORDERMANUALDISCOUNT

SALESORDERID

SALESORDERMARKETINGINFORMATION

ID

SALESORDERMARKETINGSURVEYRESPONSE

SALESORDERID

SALESORDERMEDIALINK

SALESORDERID

SALESORDERMEMBERSHIPPROMO

SALESORDERID

SALESORDERNOTE

SALESORDERID

SALESORDERPAYMENT

SALESORDERID

SALESORDERRESERVEDITEM

SALESORDERID

SALESORDERTAXEXEMPTINFO

ID

TICKET

APPLIEDTOMEMBERSHIPSALESORDERID