SALESORDERITEMMERCHANDISE
Represents a merchandise item sold as part of a sales order.
Primary Key
| Primary Key | Field Type |
|---|---|
| ID | uniqueidentifier |
Fields
| Field | Field Type | Null | Notes | Description |
|---|---|---|---|---|
| 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. |
Foreign Keys
| Foreign Key | Field Type | Null | Notes | Description |
|---|---|---|---|---|
| ID | uniqueidentifier | SALESORDERITEM.ID | Primary Key. | |
| MERCHANDISEPRODUCTINSTANCEID | uniqueidentifier | MERCHANDISEPRODUCTINSTANCE.ID | The product instance being sold. | |
| ADDEDBYID | uniqueidentifier | CHANGEAGENT.ID | FK to CHANGEAGENT. | |
| CHANGEDBYID | uniqueidentifier | CHANGEAGENT.ID | FK to CHANGEAGENT. | |
| MERCHANDISEDEPARTMENTID | uniqueidentifier | MERCHANDISEDEPARTMENT.ID | The department to which the product belonged at time of sale. | |
| MERCHANDISEDEPARTMENTCATEGORYID | uniqueidentifier | yes | MERCHANDISEDEPARTMENTCATEGORY.ID | The category to which the product belonged at time of sale. |
| MERCHANDISEPRODUCTINSTANCEOPTIONVALUE1ID | uniqueidentifier | yes | MERCHANDISEPRODUCTOPTIONVALUE.ID | Option value 1 at sale time. |
| MERCHANDISEPRODUCTINSTANCEOPTIONVALUE2ID | uniqueidentifier | yes | MERCHANDISEPRODUCTOPTIONVALUE.ID | Option value 2 at sale time. |
| MERCHANDISEPRODUCTINSTANCEOPTIONVALUE3ID | uniqueidentifier | yes | MERCHANDISEPRODUCTOPTIONVALUE.ID | Option value 3 at sale time. |
Indexes
| Index Name | Fields | Unique | Primary | Clustered |
|---|---|---|---|---|
| IX_SALESORDERITEMMERCHANDISE_DATEADDED | DATEADDED | yes | ||
| IX_SALESORDERITEMMERCHANDISE_DATECHANGED | DATECHANGED | |||
| PK_SALESORDERITEMMERCHANDISE | ID | yes | yes |
Triggers
| Trigger Name | Description |
|---|---|
| TR_SALESORDERITEMMERCHANDISE_AUDIT_UPDATE | |
| TR_SALESORDERITEMMERCHANDISE_AUDIT_DELETE |
Referenced by
| Referenced by | Field |
|---|---|
| SALESORDERITEMMERCHANDISEUNIT | SALESORDERITEMMERCHANDISEID |