BILLINGITEMPRICE
This table contains billing item prices.
Primary Key
| Primary Key |
Field Type |
| ID |
uniqueidentifier |
Fields
| Field |
Field Type |
Null |
Notes |
Description |
| STARTDATE |
date |
yes |
|
Start date of the billing item price. |
| ENDDATE |
date |
yes |
|
End date of the billing item price. |
| PRICE |
money |
|
Default = 0 |
The price of the 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. |
| DATERANGETYPECODE |
tinyint |
|
Default = 0 |
Flag indicating which kind of billing item. |
| DATERANGETYPE |
nvarchar(14) (Computed) |
yes |
CASE [DATERANGETYPECODE] WHEN 0 THEN N'All dates' WHEN 1 THEN N'Specific dates' WHEN 2 THEN N'Academic year' END |
Provides a translation for the 'DATERANGETYPECODE' field. |
Foreign Keys
| Foreign Key |
Field Type |
Null |
Notes |
Description |
| BILLINGITEMID |
uniqueidentifier |
|
BILLINGITEM.ID
|
A foreign key to the billing item. |
| ADDEDBYID |
uniqueidentifier |
|
CHANGEAGENT.ID
|
FK to CHANGEAGENT. |
| CHANGEDBYID |
uniqueidentifier |
|
CHANGEAGENT.ID
|
FK to CHANGEAGENT. |
Indexes
| Index Name |
Fields |
Unique |
Primary |
Clustered |
| IX_BILLINGITEMPRICE_DATEADDED |
DATEADDED |
|
|
yes |
| IX_BILLINGITEMPRICE_DATECHANGED |
DATECHANGED |
|
|
|
| PK_BILLINGITEMPRICE |
ID |
yes |
yes |
|
| UIX_BILLINGITEMPRICE_BILLINGITEMID_STARTDATE |
BILLINGITEMID, STARTDATE |
yes |
|
|
Triggers