project QadFinancials > class BDCollection > business logic query DCollectionByAllocation

Description

DCollectionByAllocation; query filter filters and return-field all based on the allocation information


Parameters


iiCompanyIdintegerCompany id
iiDCollectionIDintegerDCollectionID
icDCollectionReferencecharacterDCollectionReference
idDCollectionOriginalTCdecimalDCollectionOriginalTC
itFromRequestedDatedateFromRequestedDate
iiGLIdintegerGL id
icGLCodecharacterGL code
icIncSelCodecharacter


query condition


  each DCollection where
DCollection.Company_Id = iiCompanyId AND
DCollection.DCollectionReference matches icDCollectionReference AND
DCollection.DCollection_ID = iiDCollectionID AND
DCollection.DCollectionRequestedDate >= itFromRequestedDate AND
(DCollection.DCollectionOrigCreditTC = idDCollectionOriginalTC OR
DCollection.DCollectionOrigDebitTC = idDCollectionOriginalTC ) AND
DCollection.GL_ID = iiGLId AND
DCollection.DCollectionIncSelCodeList matches icIncSelCode AND
DCollection.DCollectionIsOpen = true

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

          first Currency (conditional-join) where
Currency.Currency_ID = GL.Currency_ID AND


query resultset tqDCollectionByAllocation


field namedata typedb fielddescription
tiCompany_IDintegerDCollection.Company_IDLink to Company
tcCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
tiDCollection_IDintegerDCollection.DCollection_IDRecord ID
tdDCollectionBalanceCCdecimalDCollection.DCollectionBalanceCCSC Balance
tdDCollectionBalanceDebitTCdecimalDCollection.DCollectionBalanceDebitTCTC Debit Balance
tdDCollectionBalanceLCdecimalDCollection.DCollectionBalanceLCBC Balance
tdDCollectionBalanceTCdecimalDCollection.DCollectionBalanceTCTC Balance
tcDCollectionIncSelCodeListcharacterDCollection.DCollectionIncSelCodeListCustomer Payment Selection Code
tlDCollectionIsAutomaticlogicalDCollection.DCollectionIsAutomaticAutomatic
tlDCollectionIsExecutedlogicalDCollection.DCollectionIsExecutedExecuted
tcDCollectionNamecharacterDCollection.DCollectionNameName
tiDCollectionNumberintegerDCollection.DCollectionNumberNumber
tdDCollectionOrigCreditTCdecimalDCollection.DCollectionOrigCreditTCTC Original Credit
tdDCollectionOrigDebitCCdecimalDCollection.DCollectionOrigDebitCCSC Original Debit
tdDCollectionOrigDebitLCdecimalDCollection.DCollectionOrigDebitLCBC Original Debit
tdDCollectionOrigDebitTCdecimalDCollection.DCollectionOrigDebitTCTC Original Debit
tcDCollectionReferencecharacterDCollection.DCollectionReference1099 Box Reference
ttDCollectionRequestedDatedateDCollection.DCollectionRequestedDateRequested Date
tiDCollectionYearintegerDCollection.DCollectionYearYear/Customer Payment Selection Code
tiGL_IDintegerDCollection.GL_IDGL Account
tcGLCodecharacterGL.GLCodeA code identifying the GL account.
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(DCollection),rowid(GL),rowid(Currency)


Internal usage


QadFinancials
method BBankEntry.CalculateBankStateAlloc
method BBankEntry.GetPossibleCollAllocationsDebtor