DOCUMENTPRINTINGHISTORY
Printing history for sales documents for an order.
Primary Key
Primary Key |
Field Type |
ID |
uniqueidentifier |
Fields
Field |
Field Type |
Null |
Notes |
Description |
TYPECODE |
tinyint |
|
Default = 0 |
The type of sales document |
TYPE |
nvarchar(26) (Computed) |
yes |
CASE [TYPECODE] WHEN 0 THEN N'Ticket' WHEN 1 THEN N'Itemized Receipt' WHEN 2 THEN N'Credit Card Receipt' WHEN 3 THEN N'Mailing Header' WHEN 4 THEN N'Will Call Header' WHEN 5 THEN N'Refund Itemized Receipt' WHEN 6 THEN N'Refund Credit Card Receipt' END |
Provides a translation for the 'TYPECODE' field. |
REPRINTJOBID |
uniqueidentifier |
yes |
|
|
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. |
PRINTDATEWITHTIMEOFFSET |
datetimeoffset |
yes |
|
Holds date and time document was printed |
Foreign Keys
Foreign Key |
Field Type |
Null |
Notes |
Description |
SALESORDERID |
uniqueidentifier |
yes |
SALESORDER.ID
|
Sales order that generated the sales document |
APPUSERID |
uniqueidentifier |
|
APPUSER.ID
|
Application user that printed the sales document |
WORKSTATIONID |
uniqueidentifier |
yes |
WORKSTATION.ID
|
Workstation the sales document was printed from |
CREDITCARDPAYMENTMETHODDETAILID |
uniqueidentifier |
yes |
CREDITCARDPAYMENTMETHODDETAIL.ID
|
FK to CREDITCARDPAYMENTMETHODDETAIL |
CREDITID |
uniqueidentifier |
yes |
FINANCIALTRANSACTION.ID
|
FK to CREDIT |
CREDITPAYMENTID |
uniqueidentifier |
yes |
CREDITPAYMENT.ID
|
FK to CREDITPAYMENT |
ADDEDBYID |
uniqueidentifier |
|
CHANGEAGENT.ID
|
FK to CHANGEAGENT. |
CHANGEDBYID |
uniqueidentifier |
|
CHANGEAGENT.ID
|
FK to CHANGEAGENT. |
Indexes
Index Name |
Fields |
Unique |
Primary |
Clustered |
IX_DOCUMENTPRINTINGHISTORY_CREDITID |
CREDITID |
|
|
|
IX_DOCUMENTPRINTINGHISTORY_CREDITPAYMENTID |
CREDITPAYMENTID |
|
|
|
IX_DOCUMENTPRINTINGHISTORY_DATEADDED |
DATEADDED |
|
|
yes |
IX_DOCUMENTPRINTINGHISTORY_DATECHANGED |
DATECHANGED |
|
|
|
IX_DOCUMENTPRINTINGHISTORY_SALESORDERID |
SALESORDERID |
|
|
|
PK_DOCUMENTPRINTINGHISTORY |
ID |
yes |
yes |
|
Triggers