BANKACCOUNTTRANSACTIONTEMP

This specifies the fields for the bank account transaction table.

Fields

Field Field Type Null Notes Description
ID uniqueidentifier Default = (newid()) Primary Key.
AMOUNT money Default = 0 Transaction amount
TRANSACTIONDATE datetime yes Date of the transaction
TRANSACTIONNUMBER int Default = 1 Transaction number
TRANSACTIONTYPECODE tinyint Default = 1 Transaction type
REFERENCE nvarchar(100) Default = '' Transaction reference
TRANSACTIONFLAGCODE tinyint Default = 1 Transaction flag
POSTSTATUSCODE tinyint Default = 1 Post status
POSTDATE datetime yes Post date
DELETED bit Default = 0 Transaction deleted?
DELETEDDATE datetime yes Date transaction deleted
ADDEDBYID uniqueidentifier FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier FK to CHANGEAGENT.
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.
BANKACCOUNTID uniqueidentifier Foreign key to the bank account table
TRANSFERBANKACCOUNTID uniqueidentifier yes Transfer account
GENERALLEDGERTRANSACTION int (Computed) case when TRANSACTIONTYPECODE in (8, 16, 33) then 1 else 2 end General ledger transaction type
ORIGINATINGID uniqueidentifier yes Provides a link back to the transaction that originated this field such as a payment or deposit.
TRANSACTIONFLAG nvarchar(18) (Computed) yes CASE [TRANSACTIONFLAGCODE] WHEN 1 THEN N'Deposit' WHEN 2 THEN N'Check/Payment' WHEN 3 THEN N'Adjustment' WHEN 4 THEN N'Special Adjustment' END Provides a translation for the 'TRANSACTIONFLAGCODE' field.
TRANSACTIONTYPE nvarchar(23) (Computed) yes CASE [TRANSACTIONTYPECODE] WHEN 1 THEN N'Computer check' WHEN 2 THEN N'Manual check' WHEN 3 THEN N'One-time check' WHEN 4 THEN N'EFT check' WHEN 5 THEN N'Bank draft' WHEN 8 THEN N'Deposit' WHEN 16 THEN N'Adjustment deposit' WHEN 17 THEN N'Adjustment payment' WHEN 32 THEN N'Adjustment transfer out' WHEN 33 THEN N'Adjustment transfer in' END Provides a translation for the 'TRANSACTIONTYPECODE' field.
PROCESSING bit Default = 0 This is true if the transaction is processing and should not be displayed to the user.
POSTSTATUS nvarchar(11) (Computed) yes CASE [POSTSTATUSCODE] WHEN 0 THEN N'Posted' WHEN 1 THEN N'Not posted' WHEN 2 THEN N'Do not post' END Provides a translation for the 'POSTSTATUSCODE' field.
STATUSCODE tinyint Default = 1 Transaction status
STATUS nvarchar(11) (Computed) yes CASE [STATUSCODE] WHEN 1 THEN N'Outstanding' WHEN 2 THEN N'Cleared' WHEN 3 THEN N'Reconciled' WHEN 4 THEN N'Voided' END Provides a translation for the 'STATUSCODE' field.
CLEAREDDATE datetime yes Cleared on
VOIDDATETYPECODE tinyint Default = 0 Void date
VOIDDATETYPE nvarchar(17) (Computed) yes CASE [VOIDDATETYPECODE] WHEN 0 THEN N'Today' WHEN 1 THEN N'Payment post date' WHEN 2 THEN N'Specific date' END Provides a translation for the 'VOIDDATETYPECODE' field.
VOIDDATE datetime yes
REVERSALPOSTDATE datetime yes
REVERSALPOSTDATETYPECODE tinyint Default = 1 Reversal post date
REVERSALPOSTDATETYPE nvarchar(17) (Computed) yes CASE [REVERSALPOSTDATETYPECODE] WHEN 0 THEN N'Today' WHEN 1 THEN N'Payment post date' WHEN 2 THEN N'Specific date' END Provides a translation for the 'REVERSALPOSTDATETYPECODE' field.
REVERSALPOSTSTATUSCODE tinyint Default = 1 Post status
REVERSALPOSTSTATUS nvarchar(10) (Computed) yes CASE [REVERSALPOSTSTATUSCODE] WHEN 1 THEN N'Not posted' WHEN 2 THEN N'Posted' END Provides a translation for the 'REVERSALPOSTSTATUSCODE' field.
BASECURRENCYID uniqueidentifier yes The base currency associated with this revenue.
ORGANIZATIONAMOUNT money Default = 0 The amount of the revenue in organization currency.
ORGANIZATIONEXCHANGERATEID uniqueidentifier yes The exchange rate used to convert to organization amount.
TRANSACTIONAMOUNT money Default = 0 The amount of the revenue in transaction currency.
BASEEXCHANGERATEID uniqueidentifier yes The exchange rate used to convert from transaction amount to amount.

Indexes

Index Name Fields Unique Primary Clustered
IX_BANKACCOUNTTRANSACTION_DATEADDED DATEADDED yes

Triggers

Trigger Name Description
TR_BANKACCOUNTTRANSACTION_DELETE
TR_BANKACCOUNTTRANSACTION_UPDATE
TR_BANKACCOUNTTRANSACTION_POSTDATE_CLOSEDFISCALPERIOD
TR_BANKACCOUNTTRANSACTION_INSERTUPDATE_CURRENCY
TR_BANKACCOUNTTRANSACTION_INSERT
TR_BANKACCOUNTTRANSACTION_AUDIT_UPDATE
TR_BANKACCOUNTTRANSACTION_AUDIT_DELETE