SALESORDERDISCOUNTSCENARIOCOMBINATION
Support table for auto apply discounts - Valid combinations of discount scenarios for a sales order.
Primary Key
Primary Key |
Field Type |
ID |
uniqueidentifier |
Fields
Field |
Field Type |
Null |
Notes |
Description |
SCENARIOBATCHID |
uniqueidentifier |
yes |
|
GUID used to group discount combination runs - used to optimize the combination of scenarios. |
SCENARIOCOMBINATIONID |
uniqueidentifier |
|
|
GUID used to group discount scenarios to form a valid combination of scenarios for a discount. |
DISCOUNTSCENARIOID |
uniqueidentifier |
|
|
Foreign key to a discount scenario in the SALESORDERITEMDISCOUNTOPTION table. |
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. |
DISCOUNTSCENARIOGROUPID |
uniqueidentifier |
|
|
GUID of the discount scenario group - groups together discount scenarios that have overlapping items. Discount scenarios groups can be combined independently. |
Foreign Keys
Foreign Key |
Field Type |
Null |
Notes |
Description |
SALESORDERID |
uniqueidentifier |
|
SALESORDER.ID
|
Foreign key to the SALESORDER table |
ADDEDBYID |
uniqueidentifier |
|
CHANGEAGENT.ID
|
FK to CHANGEAGENT. |
CHANGEDBYID |
uniqueidentifier |
|
CHANGEAGENT.ID
|
FK to CHANGEAGENT. |
Indexes
Index Name |
Fields |
Unique |
Primary |
Clustered |
IX_SALESORDERDISCOUNTSCENARIOCOMBINATION_DATEADDED |
DATEADDED |
|
|
yes |
IX_SALESORDERDISCOUNTSCENARIOCOMBINATION_DATECHANGED |
DATECHANGED |
|
|
|
IX_SALESORDERDISCOUNTSCENARIOCOMBINATION_DISCOUNTSCENARIOID |
DISCOUNTSCENARIOID |
|
|
|
IX_SALESORDERDISCOUNTSCENARIOCOMBINATION_SALESORDERID |
SALESORDERID |
|
|
|
IX_SALESORDERDISCOUNTSCENARIOCOMBINATION_SCENARIOCOMBINATIONID |
SCENARIOCOMBINATIONID |
|
|
|
PK_SALESORDERDISCOUNTSCENARIOCOMBINATION |
ID |
yes |
yes |
|
Triggers