BANKACCOUNTDEPOSIT
This specifies the characteristics of the bank account deposit table.
Primary Key
Primary Key |
Field Type |
ID |
uniqueidentifier |
Fields
Field |
Field Type |
Null |
Notes |
Description |
DEFAULTPAYMENTDATE |
datetime |
yes |
|
Default payment date |
DEFAULTPAYMENTAMOUNT |
decimal(19, 4) |
|
Default = 0 |
Default payment amount |
DEFAULTALLOWEDPAYMENTMETHODS |
int |
|
Default = 43 |
Default allowed payment method |
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. |
STATUSCODE |
tinyint |
|
Default = 1 |
Bank account status |
PROJECTEDAMOUNT |
decimal(19, 4) |
|
Default = 0 |
Projected amount |
PROJECTEDNUMBEROFPAYMENTS |
int |
|
Default = 0 |
Projected number of payments that will be included in this deposit |
DEFAULTPAYMENTMETHODCODE |
tinyint |
|
Default = 2 |
Default payment method |
NUMBEROFPAYMENTS |
int (Computed) |
yes |
dbo.UFN_BANKACCOUNTDEPOSIT_NUMBEROFPAYMENTS(ID) |
Number of payments included in this deposit |
STATUS |
nvarchar(8) (Computed) |
yes |
CASE [STATUSCODE] WHEN 0 THEN N'Locked' WHEN 1 THEN N'Unlocked' END |
Provides a translation for the 'STATUSCODE' field. |
DEFAULTPAYMENTMETHOD |
nvarchar(11) (Computed) |
yes |
CASE [DEFAULTPAYMENTMETHODCODE] WHEN 0 THEN N'None' WHEN 1 THEN N'Check' WHEN 2 THEN N'Cash' WHEN 8 THEN N'Credit card' WHEN 32 THEN N'Other' END |
Provides a translation for the 'DEFAULTPAYMENTMETHODCODE' field. |
TOTALPAYMENTAMOUNT |
money |
|
Default = 0 |
The total amount of the payments in their transaction currency. |
Foreign Keys
Foreign Key |
Field Type |
Null |
Notes |
Description |
ID |
uniqueidentifier |
|
FINANCIALTRANSACTION.ID
|
Primary Key. |
ADDEDBYID |
uniqueidentifier |
|
CHANGEAGENT.ID
|
FK to CHANGEAGENT. |
CHANGEDBYID |
uniqueidentifier |
|
CHANGEAGENT.ID
|
FK to CHANGEAGENT. |
OTHERPAYMENTMETHODCODEID |
uniqueidentifier |
yes |
OTHERPAYMENTMETHODCODE.ID
|
The other type of payment method used. |
CREDITTYPECODEID |
uniqueidentifier |
yes |
CREDITTYPECODE.ID
|
The type of credit card used when making a credit card payment. |
TRANSACTIONCURRENCYID |
uniqueidentifier |
yes |
CURRENCY.ID
|
The deposit and payment currency |
TRANSACTIONEXCHANGERATEID |
uniqueidentifier |
yes |
CURRENCYEXCHANGERATE.ID
|
The exchange rate used to convert from payment currency to deposit currency. |
SALESDEPOSITTEMPLATEID |
uniqueidentifier |
yes |
SALESDEPOSITTEMPLATE.ID
|
|
Indexes
Index Name |
Fields |
Unique |
Primary |
Clustered |
IX_BANKACCOUNTDEPOSIT_DATEADDED |
DATEADDED |
|
|
yes |
IX_BANKACCOUNTDEPOSIT_DATECHANGED |
DATECHANGED |
|
|
|
PK_BANKACCOUNTDEPOSIT |
ID |
yes |
yes |
|
Triggers
Referenced by