Primary Key Field Type
 ID uniqueidentifier

Field Field Type Null Notes Description
 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.
 TYPECODE tinyint   Default = 0 The type of item the sales order item represents.
 DESCRIPTION nvarchar(255)   Default = '' Description of refunded item.
 TOTAL decimal(38, 6) (Computed) (QUANTITY * PRICE) - DISCOUNTS The total price of the sales order 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.
 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' WHEN 16 THEN N'Membership Addon' END Provides a translation for the 'TYPECODE' field.

Foreign Key Field Type Null Notes Description
 CREDITID uniqueidentifier   CREDIT.ID The credit record for this credit item.
 SALESORDERITEMID uniqueidentifier SALESORDERITEM.ID The sales order item record for this credit item.
 ADDEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.
 CHANGEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.
 REVENUESPLITID uniqueidentifier REVENUESPLIT.LOCALID FK to the Revenue split that this discount applies to.

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
 CREDITGLDISTRIBUTION CREDITITEMID
 CREDITGLDISTRIBUTION DISCOUNTCREDITITEMID
 CREDITITEMEVENTREGISTRATION ID
 CREDITITEMITEMDISCOUNT CREDITITEMID
 CREDITITEMMEMBERSHIP ID
 CREDITITEMMEMBERSHIPITEMPROMOTION CREDITITEMID
 CREDITITEMTICKET CREDITITEMID

Entity-Relationship diagram of this table