MERCHANDISEPRODUCTLABLEPRINTHISTORY

Holds the history for inventory item label printing.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
ITEMDETAILS nvarchar(150) Default = '' Description of item printed on label.
PRINTSESSIONID uniqueidentifier Session ID of label printing.
QUANTITY int Default = 0 Number of labels to be printed for item.
BARCODE nvarchar(25) Default = '' SKU of item to be printed.
SALEPRICE money Default = 0 The sale price of the item.
ISEXPORT bit Default = 0 Determines whether the barcode was printed or exported.
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.
LABELPRINTFORMATCODE tinyint Default = 0 The format for the labels to be printed.
LABELPRINTFORMAT nvarchar(20) (Computed) yes CASE [LABELPRINTFORMATCODE] WHEN 0 THEN N'Single column format' WHEN 1 THEN N'Three column format' END Provides a translation for the 'LABELPRINTFORMATCODE' field.

Foreign Keys

Foreign Key Field Type Null Notes Description
MERCHANDISEPRODUCTID uniqueidentifier yes MERCHANDISEPRODUCT.ID Foreign key to MERCHANDISEPRODUCT table.
MERCHANDISEPRODUCTINSTANCEID uniqueidentifier yes MERCHANDISEPRODUCTINSTANCE.ID Foreign key to MERCHANDISEPRODUCTINSTANCE table.
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.

Indexes

Index Name Fields Unique Primary Clustered
IX_MERCHANDISEPRODUCTLABLEPRINTHISTORY_DATEADDED DATEADDED yes
IX_MERCHANDISEPRODUCTLABLEPRINTHISTORY_DATECHANGED DATECHANGED
IX_MERCHANDISEPRODUCTLABLEPRINTHISTORY_PRINTSESSIONID PRINTSESSIONID
PK_MERCHANDISEPRODUCTLABLEPRINTHISTORY ID yes yes

Triggers

Trigger Name Description
TR_MERCHANDISEPRODUCTLABLEPRINTHISTORY_AUDIT_UPDATE
TR_MERCHANDISEPRODUCTLABLEPRINTHISTORY_AUDIT_DELETE