| NUMBERID |
int |
|
Default = 0 |
Numeric ID for the discount scenario |
| DISCOUNTGROUPID |
uniqueidentifier |
|
|
GUID of the DISCOUNTGROUP ID - Used during discount calculation and does not need to be a true foreign key. |
| DISCOUNTTYPECODE |
tinyint |
|
Default = 0 |
DISCOUNTTYPECODE value for discount. |
| DISCOUNTTICKETSFORCODE |
tinyint |
|
Default = 0 |
DISCOUNTTICKETSFORCODE value for discount |
| DISCOUNTSCENARIOID |
uniqueidentifier |
|
|
GUID of the discount scenario - can span multiple rows and this field links these rows. |
| APPLIEDMANUALLY |
tinyint |
|
Default = 0 |
Denotes whether the discount was manually added to order |
| NUMBEROFTIMESAPPLIED |
int |
|
Default = 0 |
Number of time this discount is applied in the discount scenario. |
| QUALIFYINGORDERITEMID |
uniqueidentifier |
|
|
Foreign key to the SALESORDERITEM table for the order item to be used to qualify for the discount. |
| QUALIFYINGGROUPITEMID |
uniqueidentifier |
|
|
Foreign key to either EVENTID or PROGRAMID depending on value of DISCOUNTTICKETSFORCODE (0 - EVENTID; 1 - PROGRAMID) for the qualifying item. |
| QUALIFYINGPRICETYPECODEID |
uniqueidentifier |
|
|
Foreign key to the PRICETYPECODE table for the price type of the order item to be used to qualify for the discount. |
| NUMBEROFQUALIFYINGITEMS |
int |
|
Default = 0 |
Number of qualifying items for the QUALIFYINGORDERITEMID of the row. |
| NUMBEROFQUALIFYINGITEMSSTILLNEEDED |
int |
|
Default = 0 |
Number of qualifying items still needed to complete discount scenario. |
| TOTALQUALIFYINGQUANTITY |
int |
|
Default = 0 |
Number of items for the QUALIFYINGORDERITEMID that exist in order - used to calculate other values. |
| DISCOUNTEDORDERITEMID |
uniqueidentifier |
|
|
Foreign key to the SALESORDERITEM table for the order item to be discounted. |
| DISCOUNTEDGROUPITEMID |
uniqueidentifier |
|
|
Foreign key to either EVENTID or PROGRAMID depending on value of DISCOUNTTICKETSFORCODE (0 - EVENTID; 1 - PROGRAMID) for the discounted item. |
| DISCOUNTEDPRICETYPECODEID |
uniqueidentifier |
|
|
Foreign key to the PRICETYPECODE table for the price type of the order item to be discounted. |
| NUMBEROFDISCOUNTEDITEMS |
int |
|
Default = 0 |
Number of discounted items for the DISCOUNTEDORDERITEMID of the row. |
| NUMBEROFDISCOUNTEDITEMSSTILLOPEN |
int |
|
Default = 0 |
Number of discounted items open to fill discount scenario. |
| TOTALDISCOUNTEDQUANTITY |
int |
|
Default = 0 |
Number of items for the DISCOUNTEDORDERITEMID that exist in order - used to calculate other values. |
| DISCOUNTAMOUNT |
money |
|
Default = 0 |
Total amount for discount for row - sum this column for a given discount scenario to get total discount for scenario. |
| COMPLETED |
tinyint |
|
Default = 0 |
Completed status of scenario 0 - incomplete, 1 - complete, 2 - failed. |
| 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. |