CREDITITEMTEMP
Credit Items belonging to a credit record.
Primary Key
Primary Key |
Field Type |
ID |
uniqueidentifier |
Fields
Field |
Field Type |
Null |
Notes |
Description |
CREDITID |
uniqueidentifier |
|
|
The credit record for this credit item. |
SALESORDERITEMID |
uniqueidentifier |
yes |
|
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) |
yes |
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 |
yes |
|
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 |
yes |
|
The combination of tickets |
GROUPTYPECODE |
tinyint |
|
Default = 0 |
The type of item the sales order item represents. |
GROUPTYPE |
nvarchar(18) (Computed) |
yes |
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) |
yes |
(QUANTITY * PRICE) - DISCOUNTS |
The total price of the sales order item. |
TYPE |
nvarchar(40) (Computed) |
yes |
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 |
|
Indexes
Index Name |
Fields |
Unique |
Primary |
Clustered |
IX_CREDITITEM_CREDITID |
CREDITID |
|
|
|
IX_CREDITITEM_DATEADDED |
DATEADDED |
|
|
yes |
IX_CREDITITEM_DATECHANGED |
DATECHANGED |
|
|
|
IX_CREDITITEM_REVENUESPLITID |
REVENUESPLITID |
|
|
|
IX_CREDITITEM_SALESORDERITEMID |
SALESORDERITEMID |
|
|
|
PK_CREDITITEM |
ID |
yes |
yes |
|
Triggers