FEE
Stores information for fees.
Primary Key
Primary Key |
Field Type |
ID |
uniqueidentifier |
Fields
Field |
Field Type |
Null |
Notes |
Description |
NAME |
nvarchar(100) |
|
Default = '' |
The name used to identify the fee. |
DESCRIPTION |
nvarchar(255) |
|
Default = '' |
The description of the fee. |
APPLIESTOCODE |
tinyint |
|
Default = 0 |
The type of fee: 0 - Order, 1 - Item. |
APPLIESTO |
nvarchar(5) (Computed) |
yes |
CASE [APPLIESTOCODE] WHEN 0 THEN N'Order' WHEN 1 THEN N'Item' END |
Provides a translation for the 'APPLIESTOCODE' field. |
TYPECODE |
tinyint |
|
Default = 0 |
The type of amount for the fee: 0 - Amount, 1 - Percent. |
TYPE |
nvarchar(7) (Computed) |
yes |
CASE [TYPECODE] WHEN 0 THEN N'Amount' WHEN 1 THEN N'Percent' END |
Provides a translation for the 'TYPECODE' field. |
AMOUNT |
money |
|
Default = 0 |
The amount of the fee |
PERCENT |
decimal(5, 2) |
|
Default = 0 |
The percent value of the fee. |
ISACTIVE |
bit |
|
Default = 1 |
Indicates if the fee is currently active. |
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. |
Foreign Keys
Foreign Key |
Field Type |
Null |
Notes |
Description |
ADDEDBYID |
uniqueidentifier |
|
CHANGEAGENT.ID
|
FK to CHANGEAGENT. |
CHANGEDBYID |
uniqueidentifier |
|
CHANGEAGENT.ID
|
FK to CHANGEAGENT. |
Indexes
Index Name |
Fields |
Unique |
Primary |
Clustered |
IX_FEE_DATEADDED |
DATEADDED |
|
|
yes |
IX_FEE_DATECHANGED |
DATECHANGED |
|
|
|
PK_FEE |
ID |
yes |
yes |
|
UC_FEE_NAME |
NAME |
yes |
|
|
Triggers
Referenced by