Primary Key Field Type
 ID uniqueidentifier

Field Field Type Null Notes Description
 CREDITID uniqueidentifier   The credit record for this credit item.
 SALESORDERITEMID uniqueidentifier The sales order item record for this credit item.
 ADDEDBYID uniqueidentifier   FK to CHANGEAGENT.
 CHANGEDBYID uniqueidentifier   FK to CHANGEAGENT.
 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.
 PRICE money   Default = 0 The price for each item in this credit item.
 FEES money   Default = 0 The fee value for each credit item.
 QUANTITY decimal(20, 4)   Default = 0 The number of items for the credit item.
 DISCOUNTS money   Default = 0 The discount value for each credit item.
 REVENUESPLITID uniqueidentifier FK to the Revenue split that this discount applies to.
 TYPECODE tinyint   Default = 0 The type of item the sales order item represents.
 DESCRIPTION nvarchar(255)   Default = '' Description of refunded item.
 GROUPID uniqueidentifier The combination of tickets
 GROUPTYPECODE tinyint   Default = 0 The type of item the sales order item represents.
 GROUPTYPE nvarchar(18) (Computed) CASE [GROUPTYPECODE] WHEN 0 THEN N'None' WHEN 1 THEN N'Event Registration' END Provides a translation for the 'GROUPTYPECODE' field.
 TOTAL decimal(38, 6) (Computed) (QUANTITY * PRICE) - DISCOUNTS
 TYPE nvarchar(40) (Computed) CASE [TYPECODE] WHEN 0 THEN N'Ticket' WHEN 1 THEN N'Membership' WHEN 2 THEN N'Donation' WHEN 3 THEN N'Fee' WHEN 4 THEN N'Tax' WHEN 5 THEN N'Discount' WHEN 6 THEN N'Event Registration' WHEN 7 THEN N'Flat Rate' WHEN 8 THEN N'Itinerary Supply/Equipment Resource' WHEN 9 THEN N'Itinerary Item Supply/Equipment Resource' WHEN 10 THEN N'Itinerary Staffing Resource' WHEN 11 THEN N'Itinerary Item Staffing Resource' WHEN 12 THEN N'Reservation security deposit' WHEN 14 THEN N'Merchandise' END

Index Name Field(s) Unique Primary Clustered
 IX_CREDITITEM_CREDITID CREDITID      
 IX_CREDITITEM_DATEADDED DATEADDED    
 IX_CREDITITEM_DATECHANGED DATECHANGED      
 IX_CREDITITEM_REVENUESPLITID REVENUESPLITID      
 IX_CREDITITEM_SALESORDERITEMID SALESORDERITEMID      
 PK_CREDITITEM ID  

Trigger Name Description
 TR_CREDITITEM_AUDIT_UPDATE
 TR_CREDITITEM_AUDIT_DELETE

Referenced by Field
 CREDITITEMTICKET CREDITITEMID