Primary Key | Field Type |
---|---|
ID | uniqueidentifier |
Field | Field Type | Null | Notes | Description |
---|---|---|---|---|
TRANSACTIONDATE | datetime | The date of the order transaction. | ||
STATUSCODE | tinyint | Default = 0 | Status of the condition of the order. | |
COMMENTS | nvarchar(1000) | Default = '' | Remarks about this sales order. | |
CUSTOMIDENTIFIER | nvarchar(100) | Default = '' | User-definable custom identifier. | |
SEQUENCEID | int | Identity column used to increment the default lookupid. | ||
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. | |
SALESMETHODTYPECODE | tinyint | Default = 0 | The type of sales method. | |
SAMEASPATRON | bit | Default = 0 | Determines if delivery information is same as patron information | |
SALESMETHODTYPE | nvarchar(13) (Computed) | CASE [SALESMETHODTYPECODE] WHEN 0 THEN N'Daily Sales' WHEN 1 THEN N'Advance Sales' WHEN 2 THEN N'Online Sales' WHEN 3 THEN N'Group Sales' END | Provides a translation for the 'SALESMETHODTYPECODE' field. | |
LOOKUPID | nvarchar(100) (Computed) | (CASE LEN(CUSTOMIDENTIFIER) WHEN 0 THEN '8-' + CAST(SEQUENCEID AS nvarchar(20)) ELSE CUSTOMIDENTIFIER END) | Unique identifer that supports user defined values as well as system generated values. | |
TRANSACTIONDATEWITHTIMEOFFSET | datetimeoffset | The date of the order transaction. | ||
LASTRECALCULATIONDATE | datetime | The date of the last recalculation of taxes, fees, and discounts. | ||
STATUS | nvarchar(10) (Computed) | CASE [STATUSCODE] WHEN 0 THEN N'Pending' WHEN 1 THEN N'Complete' WHEN 2 THEN N'Tentative' WHEN 3 THEN N'Confirmed' WHEN 4 THEN N'Finalized' WHEN 5 THEN N'Cancelled' WHEN 6 THEN N'Reserved' WHEN 7 THEN N'Unresolved' END | Provides a translation for the 'STATUSCODE' field. | |
REFUNDSTATUS | int (Computed) | dbo.UFN_SALESORDER_GETREFUNDSTATUS(ID) | ||
AMOUNT | money (Computed) | dbo.UFN_SALESORDER_TOTAL(ID) |
Foreign Key | Field Type | Null | Notes | Description |
---|---|---|---|---|
ADDEDBYID | uniqueidentifier | CHANGEAGENT.ID | FK to CHANGEAGENT. | |
CHANGEDBYID | uniqueidentifier | CHANGEAGENT.ID | FK to CHANGEAGENT. | |
CONSTITUENTID | uniqueidentifier | CONSTITUENT.LOCALID | The constituent linked to the order. | |
REVENUEID | uniqueidentifier | FINANCIALTRANSACTION.ID | The revenue item linked to the order. | |
DELIVERYMETHODID | uniqueidentifier | DELIVERYMETHOD.ID | The delivery method used to deliver the tickets in this order | |
RECIPIENTID | uniqueidentifier | CONSTITUENT.LOCALID | The constituent to recieve the order; contact in group sales | |
ADDRESSID | uniqueidentifier | ADDRESS.LOCALID | The address used to deliver the order | |
PHONEID | uniqueidentifier | PHONE.LOCALID | The phone number for the recipient | |
EMAILADDRESSID | uniqueidentifier | EMAILADDRESS.ID | The email address for the recipient | |
APPUSERID | uniqueidentifier | APPUSER.ID | The application user who entered the order | |
CONTACTRELATIONSHIPID | uniqueidentifier | RELATIONSHIP.ID |
Index Name | Field(s) | Unique | Primary | Clustered |
---|---|---|---|---|
IX_SALESORDER_ADDRESSID | ADDRESSID | |||
IX_SALESORDER_APPUSERID | APPUSERID | |||
IX_SALESORDER_CONSTITUENTID | CONSTITUENTID | |||
IX_SALESORDER_DATEADDED | DATEADDED | |||
IX_SALESORDER_DATECHANGED | DATECHANGED | |||
IX_SALESORDER_RECIPIENTID | RECIPIENTID | |||
IX_SALESORDER_REVENUEID | REVENUEID | |||
IX_SALESORDER_TRANSACTIONDATE | TRANSACTIONDATE (DESC) | |||
PK_SALESORDER | ID | |||
UC_SALESORDER_LOOKUPID | LOOKUPID |
Trigger Name | Description |
---|---|
TR_SALESORDER_UPDATE_TRANSACTIONDATETIMEWITHOFFSET | |
TR_SALESORDER_AUDIT_UPDATE | |
TR_SALESORDER_AUDIT_DELETE |
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 |
TICKET | APPLIEDTOMEMBERSHIPSALESORDERID |
Entity-Relationship diagram of this table (SALESORDERDISCOUNTLIMITOVERRIDE-TICKET)