Stores the item membership promotion.
Primary Key
Primary Key |
Field Type |
ID |
uniqueidentifier |
Fields
Field |
Field Type |
Null |
Notes |
Description |
PROMOTIONNAME |
nvarchar(100) |
|
Default = '' |
Name of promotion at time of sale. |
AMOUNT |
money |
|
Default = 0 |
Amount of the promotion |
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. |
EXTENSIONCALCULATIONTYPECODE |
tinyint |
|
Default = 0 |
The type of term extension: 0 - Day, 1 - Month |
EXTENSIONCALCULATIONTYPE |
nvarchar(12) (Computed) |
yes |
CASE [EXTENSIONCALCULATIONTYPECODE] WHEN 0 THEN N'Days added' WHEN 1 THEN N'Months added' END |
Provides a translation for the 'EXTENSIONCALCULATIONTYPECODE' field. |
EXTENSIONVALUE |
int |
|
Default = 0 |
The number of days/months to extend the term by. |
ORGANIZATIONAMOUNT |
money |
|
Default = 0 |
Amount of promotion in organization currency. |
Foreign Keys
Foreign Key |
Field Type |
Null |
Notes |
Description |
SALESORDERITEMID |
uniqueidentifier |
|
SALESORDERITEM.ID
|
Sales order item with item promotion |
ADDEDBYID |
uniqueidentifier |
|
CHANGEAGENT.ID
|
FK to CHANGEAGENT. |
CHANGEDBYID |
uniqueidentifier |
|
CHANGEAGENT.ID
|
FK to CHANGEAGENT. |
MEMBERSHIPPROMOID |
uniqueidentifier |
yes |
MEMBERSHIPPROMO.ID
|
Promotion being used |
ORGANIZATIONEXCHANGERATEID |
uniqueidentifier |
yes |
CURRENCYEXCHANGERATE.ID
|
The exchange rate used to convert from amount to organization amount. |
BASECURRENCYID |
uniqueidentifier |
yes |
CURRENCY.ID
|
The base currency associated with this item membership promotion. |
Indexes
Index Name |
Fields |
Unique |
Primary |
Clustered |
IX_SALESORDERITEMMEMBERSHIPITEMPROMOTION_BASECURRENCYID |
BASECURRENCYID |
|
|
|
IX_SALESORDERITEMMEMBERSHIPITEMPROMOTION_DATEADDED |
DATEADDED |
|
|
yes |
IX_SALESORDERITEMMEMBERSHIPITEMPROMOTION_DATECHANGED |
DATECHANGED |
|
|
|
IX_SALESORDERITEMMEMBERSHIPITEMPROMOTION_ORGANIZATIONEXCHANGERATEID |
ORGANIZATIONEXCHANGERATEID |
|
|
|
IX_SALESORDERITEMMEMBERSHIPITEMPROMOTION_SALESORDERITEMID |
SALESORDERITEMID |
|
|
|
PK_SALESORDERITEMMEMBERSHIPITEMPROMOTION |
ID |
yes |
yes |
|
Triggers
Referenced by