| Primary Key | Field Type |
|---|---|
ID |
uniqueidentifier |
| 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) | ![]() |
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) | ![]() |
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 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 | ![]() |
MEMBERSHIPPROMO.ID | Promotion being used |
ORGANIZATIONEXCHANGERATEID |
uniqueidentifier | ![]() |
CURRENCYEXCHANGERATE.ID | The exchange rate used to convert from amount to organization amount. |
BASECURRENCYID |
uniqueidentifier | ![]() |
CURRENCY.ID | The base currency associated with this item membership promotion. |
| Index Name | Field(s) | Unique | Primary | Clustered |
|---|---|---|---|---|
IX_SALESORDERITEMMEMBERSHIPITEMPROMOTION_BASECURRENCYID |
BASECURRENCYID | |||
IX_SALESORDERITEMMEMBERSHIPITEMPROMOTION_DATEADDED |
DATEADDED | ![]() |
||
IX_SALESORDERITEMMEMBERSHIPITEMPROMOTION_DATECHANGED |
DATECHANGED | |||
IX_SALESORDERITEMMEMBERSHIPITEMPROMOTION_ORGANIZATIONEXCHANGERATEID |
ORGANIZATIONEXCHANGERATEID | |||
IX_SALESORDERITEMMEMBERSHIPITEMPROMOTION_SALESORDERITEMID |
SALESORDERITEMID | |||
PK_SALESORDERITEMMEMBERSHIPITEMPROMOTION |
ID | ![]() |
![]() |
| Trigger Name | Description |
|---|---|
TR_SALESORDERITEMMEMBERSHIPITEMPROMOTION_AUDIT_UPDATE |
|
TR_SALESORDERITEMMEMBERSHIPITEMPROMOTION_AUDIT_DELETE |
|
TR_SALESORDERITEMMEMBERSHIPITEMPROMOTION_INSERTUPDATE_CURRENCY |
| Referenced by | Field |
|---|---|
CREDITITEM_EXT |
SALESORDERITEMMEMBERSHIPITEMPROMOTIONID |
CREDITITEMMEMBERSHIPITEMPROMOTION |
SALESORDERITEMMEMBERSHIPITEMPROMOTIONID |
SALESORDERITEMMEMBERSHIPITEMPROMOTIONAPPLIEDITEM |
SALESORDERITEMMEMBERSHIPITEMPROMOTIONID |

ID
PROMOTIONNAME
TSLONG
SALESORDERITEMID
IX_SALESORDERITEMMEMBERSHIPITEMPROMOTION_BASECURRENCYID
IX_SALESORDERITEMMEMBERSHIPITEMPROMOTION_DATEADDED