project QadFinancials > class BBankEntry > business logic query BankStateByGLBankStateNbr

Description

BankStateByGLBankStateNbr; set of bank-states for a GL filtered and sorted by GL+BankStateNumber


Parameters


iiCompanyIdintegerCompany id
icMinBankStateNumbercharacterWhen passing a value for this parameter then only those bank-states with a strictly higher banknumber will be returned
iiGLIDintegerGL-ID of the Bank-GL you need a number for
icBankStateLineStatuscharacterStatus of Bank State Line
icGLCodecharacterGL code
icBankStateStatuscharacter


query condition


  each BankState where
BankState.Company_Id = iiCompanyId AND
BankState.BankStateNumber > icMinBankStateNumber AND
BankState.GL_ID = iiGLID AND
BankState.BankStateStatus = icBankStateStatus

      each BankStateLine (inner-join) where
BankStateLine.Company_Id = iiCompanyId AND
BankStateLine.BankState_ID = BankState.BankState_ID AND
BankStateLine.BankStateLineStatus matches icBankStateLineStatus

      first GL (inner-join) where
GL.SharedSet_Id = vi_GL_sharedset(iiCompanyId) AND
GL.GL_ID = BankState.GL_ID AND
GL.GLCode matches icGLCode


query sort order


BankState.Company_ID (ascending)
BankState.GL_ID (ascending)
BankState.BankStateNumber (ascending)


query resultset tqBankStateByGLBankStateNbr


field namedata typedb fielddescription
tdBankStateLineAmountTCdecimalBankStateLine.BankStateLineAmountTCTC Amount
tcBankStateLineStatuscharacterBankStateLine.BankStateLineStatusStatus
tcBankStateStatuscharacterBankState.BankStateStatusStatus
tcGLCodecharacterGL.GLCodeA code identifying the GL account.
tiCompany_IDintegerBankState.Company_IDLink to Company
tiBankState_IDintegerBankState.BankState_IDRecord ID
tiGL_IDintegerBankState.GL_IDGL Account
tcBankStateNumbercharacterBankState.BankStateNumberBank Statement No


Internal usage


QadFinancials
method BBankEntry.AdditionalUpdatesBankImpLine
method BBankEntry.CalculateBankState
method BCashBox.GetCashGLInfo