BANKACCOUNT

This table contains information about a bank account.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
ACCOUNTNUMBER nvarchar(4000) Default = '' User-defined bank account number
ROUTINGNUMBER nvarchar(4000) Default = '' User-defined bank account number
ACCOUNTTYPECODE tinyint Default = 1 Bank account type
STATUSCODE tinyint Default = 1 Bank account status
MINIMUMBALANCE decimal(19, 4) Default = 0 Minimum balance required to avoid service charge
DEFAULTPRINTER nvarchar(255) Default = '' Default printer for the bank
RECONCILED bit Default = 0 Indicates whether or not the bank is reconciled
DATELASTRECONCILED datetime yes Date that the bank was last reconciled
RECONCILEDBALANCE decimal(19, 4) Default = 0 Bank account balance as of the last time it was reconciled
PRINTCONTACTPOSITION bit Default = 0 Indicates whether or not to print the contact
LASTDEPOSITNUM int Default = 0
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.
ACCOUNTNAME nvarchar(100) Default = '' Account name
ACCOUNTTYPE nvarchar(8) (Computed) yes CASE [ACCOUNTTYPECODE] WHEN 1 THEN N'Checking' WHEN 2 THEN N'Savings' WHEN 3 THEN N'Other' END Provides a translation for the 'ACCOUNTTYPECODE' field.
STATUS nvarchar(6) (Computed) yes CASE [STATUSCODE] WHEN 0 THEN N'Closed' WHEN 1 THEN N'Open' END Provides a translation for the 'STATUSCODE' field.
DEFAULTCASHACCOUNTTYPECODE tinyint Default = 0 Either use an account number or an account code (masking) for the default cash account
DEFAULTCASHACCOUNTTYPE nvarchar(21) (Computed) yes CASE [DEFAULTCASHACCOUNTTYPECODE] WHEN 0 THEN N'Select a cash account' WHEN 1 THEN N'Select a cash code' END Provides a translation for the 'DEFAULTCASHACCOUNTTYPECODE' field.
CLIENTNAME nvarchar(100) Default = '' An alternate name for the bank account
USERNUMBER nvarchar(24) Default = '' The processing identifier for EFT processes
SORTCODE nvarchar(8) Default = '' User-defined sort code for the UK
BIC nvarchar(11) Default = ''
BANKCODE nvarchar(25) Default = ''

Foreign Keys

Foreign Key Field Type Null Notes Description
BANKID uniqueidentifier BANK.LOCALID Bank
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
GLACCOUNTID uniqueidentifier yes GLACCOUNT.ID The default cash account to use for the bank account
PDACCOUNTSEGMENTVALUEID uniqueidentifier yes PDACCOUNTSEGMENTVALUE.ID The account code to be used for the account masking
PDACCOUNTSYSTEMID uniqueidentifier yes PDACCOUNTSYSTEM.ID The account system in use for this bank account
TRANSACTIONCURRENCYID uniqueidentifier yes CURRENCY.ID The transaction currency associated with this bank account.
BANKINGSYSTEMID uniqueidentifier yes BANKINGSYSTEM.ID

Indexes

Index Name Fields Unique Primary Clustered
IX_BANKACCOUNT_DATEADDED DATEADDED yes
IX_BANKACCOUNT_DATECHANGED DATECHANGED
PK_BANKACCOUNT ID yes yes
UC_BANKACCOUNT_ACCOUNTNAME ACCOUNTNAME yes
UIX_BANKACCOUNT_BANKID_ACCOUNTNUMBER BANKID, ACCOUNTNUMBER yes

Triggers

Trigger Name Description
TR_BANKACCOUNT_PDACCOUNTSEGMENTVALUEID_ISACCOUNTCODE
TR_BANKACCOUNT_ACCOUNTCODE_ISUNIQUE
TR_BANKACCOUNT_PDACCOUNTSYSTEMID_DEFAULT
TR_BANKACCOUNT_AUDIT_UPDATE
TR_BANKACCOUNT_AUDIT_DELETE
TR_BANKACCOUNT_VALIDCURRENCY
TR_BANKACCOUNT_GLACCOUNTIDPDACCOUNTSEGMENTID_VALIDREQUIRED

Referenced by

Referenced by Field
BANKACCOUNTADJUSTMENTCATEGORY TRANSFERBANKACCOUNTID
BANKACCOUNTADJUSTMENTCATEGORY BANKACCOUNTID
BANKACCOUNTAUTHORIZEDSIGNATURE BANKACCOUNTID
BANKACCOUNTEFTINFO ID
BANKACCOUNTSEPAINFO ID
BANKACCOUNTSITE BANKACCOUNTID
BANKACCOUNTTRANSACTION_EXT BANKACCOUNTID
BANKACCOUNTTRANSACTION_EXT TRANSFERBANKACCOUNTID
CONTROLACCOUNTTREASURY BANKACCOUNTID
CREDITMEMO BANKACCOUNTID
DISBURSEMENTPROCESS BANKACCOUNTID
DISBURSEMENTPROCESSTEMPLATE BANKACCOUNTID
GENERATEBACSFILEPROCESS BANKACCOUNTID
GENERATEEFTFILEPROCESS BANKACCOUNTID
INVOICE BANKACCOUNTID
PAPERLESSMANDATESINSTRUCTIONPROCESS BANKACCOUNTID
POSTTOGLPROCESSBANKACCOUNTFILTER BANKACCOUNTID
PRENOTIFICATIONPROCESS BANKACCOUNTID
SALESDEPOSITTEMPLATE BANKACCOUNTID
VENDOR PAYMENTBANKACCOUNTID