BILLINGITEM
This table contains billing items.
Primary Key
Primary Key |
Field Type |
ID |
uniqueidentifier |
Fields
Field |
Field Type |
Null |
Notes |
Description |
ISINACTIVE |
bit |
|
Default = 0 |
Indicates whether the billing item is no longer offered. |
PRICETYPECODE |
tinyint |
|
Default = 1 |
Flag indicating which kind of billing item. |
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. |
DESCRIPTION |
nvarchar(255) (Computed) |
yes |
dbo.UFN_BILLINGITEM_GETDESCRIPTIONFROMPRODUCT(ID) |
Description of the Billing Item. |
NAME |
nvarchar(100) (Computed) |
yes |
dbo.UFN_BILLINGITEM_GETNAMEFROMPRODUCT(ID) |
Name of the Billing Item. |
PRICETYPE |
nvarchar(19) (Computed) |
yes |
CASE [PRICETYPECODE] WHEN 1 THEN N'Flat rate' WHEN 2 THEN N'Vary by grade level' WHEN 3 THEN N'Vary by school' END |
Provides a translation for the 'PRICETYPECODE' field. |
Foreign Keys
Foreign Key |
Field Type |
Null |
Notes |
Description |
ID |
uniqueidentifier |
|
PRODUCT.ID
|
Primary Key. |
ADDEDBYID |
uniqueidentifier |
|
CHANGEAGENT.ID
|
FK to CHANGEAGENT. |
CHANGEDBYID |
uniqueidentifier |
|
CHANGEAGENT.ID
|
FK to CHANGEAGENT. |
Indexes
Index Name |
Fields |
Unique |
Primary |
Clustered |
IX_BILLINGITEM_DATEADDED |
DATEADDED |
|
|
yes |
IX_BILLINGITEM_DATECHANGED |
DATECHANGED |
|
|
|
PK_BILLINGITEM |
ID |
yes |
yes |
|
Triggers
Referenced by