project QadFinancials > class BCashBoxReport > business logic query BaseCashBook


Parameters


iiCompanyIdintegerCompany id
icGLCodecharacter
itFromPostingDatedate
itToPostingDatedate
icJournalCodecharacter
iiPostingVoucherinteger
icLayercharacter
iiAccPeriodinteger
iiAccYearinteger


query condition


  each GL where
GL.SharedSet_Id = vi_GL_sharedset(iiCompanyId) AND
GL.GLCode = icGLCode

      each BankState (inner-join) where
BankState.Company_Id = iiCompanyId AND
BankState.GL_ID = GL.GL_ID AND

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

              first Posting (inner-join) where
Posting.Company_Id = iiCompanyId AND
Posting.Posting_ID = BankStateLine.Posting_ID AND
Posting.PostingDate >= itFromPostingDate AND
Posting.PostingDate <= itToPostingDate AND
Posting.PostingVoucher = iiPostingVoucher

                  first Journal (inner-join) where
Journal.SharedSet_Id = vi_JOURNAL_sharedset(iiCompanyId) AND
Journal.Journal_ID = Posting.Journal_ID AND
Journal.JournalCode = icJournalCode

                      first Layer (inner-join) where
Layer.Layer_ID = Journal.Layer_ID AND
Layer.LayerCode can-do icLayer

                  first Period (inner-join) where
Period.Company_Id = iiCompanyId AND
Period.Period_ID = Posting.Period_ID AND
Period.PeriodYear = iiAccYear AND
Period.PeriodPeriod = iiAccPeriod

                  each PostingLine (inner-join) where
PostingLine.Company_Id = iiCompanyId AND
PostingLine.Posting_ID = Posting.Posting_ID AND

                      first Currency1 (inner-join) where
Currency1.Currency_ID = PostingLine.Currency_ID AND

                      first GL2 (inner-join) where
GL2.SharedSet_Id = vi_GL_sharedset(iiCompanyId) AND
GL2.GL_ID = PostingLine.GL_ID AND

          first Currency2 (inner-join) where
Currency2.Currency_ID = BankState.Currency_ID AND


query resultset tqBaseCashBook


field namedata typedb fielddescription
tcBankStateLineInOutcharacterBankStateLine.BankStateLineInOutIn/Out
tcCurrencyCodecharacterCurrency1.CurrencyCodeCurrency Code
tcCurrencyCodeBankLinecharacterCurrency2.CurrencyCodeCurrency Code
tiCurrencyNumberOfDecimalsintegerCurrency1.CurrencyNumberOfDecimalsNumber of Decimals
tiGL_IDintegerGL.GL_IDRecord ID
tcGLCodecharacterGL.GLCodeA code identifying the GL account.
tcGLCodeBankcharacterGL2.GLCodeA code identifying the GL account.
tcGLDescriptioncharacterGL.GLDescriptionA description of the GL account.
tcJournalCodecharacterJournal.JournalCodeA daybook code (maximum eight characters).
ttPostingDatedatePosting.PostingDateThe accounting date on which the journal entry is posted. The posting date must be a valid calendar date and must be within the GL calendar year (PostingYear) and period (PostingPeriod).
tdPostingLineCreditLCdecimalPostingLine.PostingLineCreditLCBC Credit
api annotation:Partial Update = yes - it will get a default value depends on the value of PostingLineCreditTC, PostingLineExchangeRate & PostingLineRateScale.
BC Amount = TC Amount * Exchange rate (TC/BC) * Scale Factor (TC/BC). If Partial Update is false, enter a value for this field.
tdPostingLineCreditTCdecimalPostingLine.PostingLineCreditTCTC Credit
tdPostingLineDebitLCdecimalPostingLine.PostingLineDebitLCBC Debit
api annotation:Partial Update = yes - it will get a default value depending on the value of PostingLineDebitTC, PostingLineExchangeRate and PostingLineRateScale.
BC Amount = TC Amount * Exchange rate (TC/BC) * Scale Factor (TC/BC). If Partial Update = false, enter the correct value into this field.
tdPostingLineDebitTCdecimalPostingLine.PostingLineDebitTCTC Debit
tiPostingVoucherintegerPosting.PostingVoucherVoucher is a sequential number that uniquely identifies the journal entry (within the combination of an entity and a daybook code).
api annotation:In create mode,enter 0 in this field - the voucher number is generated by the system. In Modify/Delete, the correct voucher number must be entered because this identifies the record.
tiPostingYearintegerPeriod.PeriodYearGL Calendar Year
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(GL),rowid(BankState),rowid(BankStateLine),rowid(Posting),rowid(Journal),rowid(Layer),rowid(Period),rowid(PostingLine),rowid(Currency1),rowid(GL2),rowid(Currency2)


Internal usage


QadFinancials
method BCashBoxReport.CashBook