| 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) | yes | 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) | yes | 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) | yes | CONVERT(bigint, TS) | Numeric representation of the timestamp. | 
                                                
                                                    | EXTENSIONCALCULATIONTYPE | nvarchar(14) (Computed) | yes | 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) | yes | CASE [APPLICATIONTYPECODE] WHEN 0 THEN N'Manually' WHEN 1 THEN N'With code' WHEN 2 THEN N'Automatically' END |  | 
                                                
                                                    | ORGANIZATIONAMOUNT | money |  | Default = 0.00 |  | 
                                                
                                                    | FORMATTEDVALUE | nvarchar(max) (Computed) | yes | case PROMOTIONTYPECODE when 0 then case DISCOUNTCALCULATIONTYPECODE when 0 then '$' + cast(AMOUNT as nvarchar(max)) + ' 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 |  |