DISCOUNTPRICETYPE
Stores information for price types that receive discounts.
Primary Key
| Primary Key |
Field Type |
| ID |
uniqueidentifier |
Fields
| Field |
Field Type |
Null |
Notes |
Description |
| PERCENT |
decimal(5, 2) |
|
Default = 0.00 |
The percentage of a discount. |
| AMOUNT |
money |
|
Default = 0.00 |
The amount for a discount. |
| SEQUENCE |
int |
|
Default = 0 |
The sequence in which price types are entered. |
| 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 |
| DISCOUNTID |
uniqueidentifier |
|
DISCOUNT.ID
|
The ID of the Discount the Price Type belongs to. |
| PRICETYPECODEID |
uniqueidentifier |
yes |
PRICETYPECODE.ID
|
The ID of the Price Type to be discounted - null is all price types not already discounted. |
| ADDEDBYID |
uniqueidentifier |
|
CHANGEAGENT.ID
|
FK to CHANGEAGENT. |
| CHANGEDBYID |
uniqueidentifier |
|
CHANGEAGENT.ID
|
FK to CHANGEAGENT. |
Indexes
| Index Name |
Fields |
Unique |
Primary |
Clustered |
| IX_DISCOUNTPRICETYPE_DATEADDED |
DATEADDED |
|
|
yes |
| IX_DISCOUNTPRICETYPE_DATECHANGED |
DATECHANGED |
|
|
|
| PK_DISCOUNTPRICETYPE |
ID |
yes |
yes |
|
| UIX_DISCOUNTPRICETYPE_DISCOUNTID_PRICETYPECODEID |
DISCOUNTID, PRICETYPECODEID |
yes |
|
|
Triggers