Primary Key Field Type
 ID uniqueidentifier

Field Field Type Null Notes Description
 NAME nvarchar(100)   Default = '' The name used to identify the promotion.
 DESCRIPTION nvarchar(255)   Default = '' The description of the promotion.
 PROMOTIONTYPECODE tinyint   Default = 0 The type of promotion: 0 - Discount, 1 - Term extension.
 PROMOTIONTYPE nvarchar(14) (Computed) CASE [PROMOTIONTYPECODE] WHEN 0 THEN N'Discount' WHEN 1 THEN N'Term extension' END Provides a translation for the 'PROMOTIONTYPECODE' field.
 EXTENSIONCALCULATIONTYPECODE tinyint   Default = 0 The type of term extension: 0 - Day, 1 - Month
 DISCOUNTCALCULATIONTYPECODE tinyint   Default = 0 The type of discount: 0 - Amount, 1 - Percentage.
 DISCOUNTCALCULATIONTYPE nvarchar(11) (Computed) CASE [DISCOUNTCALCULATIONTYPECODE] WHEN 0 THEN N'Amount off' WHEN 1 THEN N'Percent off' END Provides a translation for the 'DISCOUNTCALCULATIONTYPECODE' field.
 APPLICATIONTYPECODE tinyint   Default = 0 How the discount is applied: 0 - Manually, 1- Promo Code.
 PERCENT decimal(5, 2)   Default = 0.00 The percentage of a discount.
 AMOUNT money   Default = 0.00 The amount for a discount.
 EXTENSIONVALUE int   Default = 0 The number of days/months to extend the term by.
 ISACTIVE bit   Default = 1 Indicates if the discount is currently active.
 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.
 EXTENSIONCALCULATIONTYPE nvarchar(14) (Computed) CASE [EXTENSIONCALCULATIONTYPECODE] WHEN 0 THEN N'Days added' WHEN 1 THEN N'Month(s) added' END Provides a translation for the 'EXTENSIONCALCULATIONTYPECODE' field.
 APPLICATIONTYPE nvarchar(13) (Computed) CASE [APPLICATIONTYPECODE] WHEN 0 THEN N'Manually' WHEN 1 THEN N'With code' WHEN 2 THEN N'Automatically' END
 FORMATTEDVALUE nvarchar(12) (Computed) case PROMOTIONTYPECODE when 0 then case DISCOUNTCALCULATIONTYPECODE when 0 then '$' + cast(AMOUNT as nvarchar(7)) + ' off' when 1 then cast([PERCENT] as nvarchar(6)) + '% off' end when 1 then case EXTENSIONCALCULATIONTYPECODE when 0 then cast(EXTENSIONVALUE as nvarchar(2)) + ' days' when 1 then cast(EXTENSIONVALUE as nvarchar(2)) + ' months' end end
 ORGANIZATIONAMOUNT money   Default = 0.00

Foreign Key Field Type Null Notes Description
 ADDEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.
 CHANGEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.
 BASECURRENCYID uniqueidentifier CURRENCY.ID
 ORGANIZATIONEXCHANGERATEID uniqueidentifier CURRENCYEXCHANGERATE.ID

Index Name Field(s) Unique Primary Clustered
 IX_MEMBERSHIPPROMO_BASECURRENCYID BASECURRENCYID      
 IX_MEMBERSHIPPROMO_DATEADDED DATEADDED    
 IX_MEMBERSHIPPROMO_DATECHANGED DATECHANGED      
 IX_MEMBERSHIPPROMO_ORGANIZATIONEXCHANGERATEID ORGANIZATIONEXCHANGERATEID      
 PK_MEMBERSHIPPROMO ID  
 UC_MEMBERSHIPPROMO_NAME NAME    

Trigger Name Description
 TR_MEMBERSHIPPROMO_AUDIT_UPDATE
 TR_MEMBERSHIPPROMO_AUDIT_DELETE
 TR_MEMBERSHIPPROMO_INSERTUPDATE_CURRENCY

Referenced by Field
 BATCHMEMBERSHIPDUES MEMBERSHIPPROMOID
 BATCHMEMBERSHIPDUES APPLIEDDISCOUNTID
 CREDITITEM_EXT MEMBERSHIPPROMOID
 DAILYSALEITEMMEMBERSHIPPROMO MEMBERSHIPPROMOID
 MEMBERSHIPPROMOAVAILABILITY MEMBERSHIPPROMOID
 MEMBERSHIPPROMOCODE MEMBERSHIPPROMOID
 MEMBERSHIPTRANSACTION MEMBERSHIPPROMOID
 SALESORDERITEMMEMBERSHIPITEMPROMOTION MEMBERSHIPPROMOID
 SALESORDERITEMMEMBERSHIPPROMO MEMBERSHIPPROMOID
 SALESORDERMEMBERSHIPPROMO MEMBERSHIPPROMOID

Entity-Relationship diagram of this table