SALESDEPOSITTEMPLATE
Contains template information for a sales deposit.
Primary Key
Primary Key |
Field Type |
ID |
uniqueidentifier |
Fields
Field |
Field Type |
Null |
Notes |
Description |
NAME |
nvarchar(100) |
|
Default = '' |
Template name |
POSTSTATUSCODE |
tinyint |
|
Default = 1 |
Post status |
REFERENCECODE |
tinyint |
|
Default = 0 |
Transaction reference |
REFERENCE |
nvarchar(36) (Computed) |
yes |
CASE [REFERENCECODE] WHEN 0 THEN N'Deposit template name' WHEN 1 THEN N'Process name' WHEN 2 THEN N'Process name + Deposit template name' END |
Provides a translation for the 'REFERENCECODE' field. |
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. |
POSTSTATUS |
nvarchar(14) (Computed) |
yes |
CASE [POSTSTATUSCODE] WHEN 1 THEN N'Not yet posted' WHEN 2 THEN N'Do not post' END |
Provides a translation for the 'POSTSTATUSCODE' field. |
SALESCHANNELOPTIONCODE |
tinyint |
|
Default = 0 |
|
PAYMENTMETHODOPTIONCODE |
tinyint |
|
Default = 0 |
|
PAYMENTMETHODOPTION |
nvarchar(24) (Computed) |
yes |
CASE [PAYMENTMETHODOPTIONCODE] WHEN 0 THEN N'All payment methods' WHEN 1 THEN N'Specific payment methods' END |
|
INCLUDEINPROCESS |
bit |
|
Default = 0 |
|
SALESCHANNELOPTION |
nvarchar(24) (Computed) |
yes |
CASE [SALESCHANNELOPTIONCODE] WHEN 0 THEN N'All revenue sources' WHEN 1 THEN N'Specific revenue sources' END |
|
CURRENCYOPTIONCODE |
tinyint |
|
Default = 0 |
|
CURRENCYOPTION |
nvarchar(19) (Computed) |
yes |
CASE [CURRENCYOPTIONCODE] WHEN 0 THEN N'All currencies' WHEN 1 THEN N'Specific currencies' END |
|
Foreign Keys
Foreign Key |
Field Type |
Null |
Notes |
Description |
SALESDEPOSITPROCESSID |
uniqueidentifier |
yes |
SALESDEPOSITPROCESS.ID
|
FK to SALESDESPOSITPROCESS table. |
BANKACCOUNTID |
uniqueidentifier |
|
BANKACCOUNT.ID
|
FK to BANKACCOUNT table. |
ADDEDBYID |
uniqueidentifier |
|
CHANGEAGENT.ID
|
FK to CHANGEAGENT. |
CHANGEDBYID |
uniqueidentifier |
|
CHANGEAGENT.ID
|
FK to CHANGEAGENT. |
Indexes
Index Name |
Fields |
Unique |
Primary |
Clustered |
IX_SALESDEPOSITTEMPLATE_DATEADDED |
DATEADDED |
|
|
yes |
IX_SALESDEPOSITTEMPLATE_DATECHANGED |
DATECHANGED |
|
|
|
PK_SALESDEPOSITTEMPLATE |
ID |
yes |
yes |
|
UIX_SALESDEPOSITTEMPLATE_NAME_SALESDEPOSITPROCESSID |
NAME, SALESDEPOSITPROCESSID |
yes |
|
|
Triggers
Referenced by