project QadFinancials > class BCashBoxReport > business logic query BaseCashOperation


Parameters


iiCompanyIdintegerCompany id
icBankStateTransactionTypecharacter
icCanDoBankStateLinescharacter


query condition


  each BankState where
BankState.Company_Id = iiCompanyId AND
BankState.BankStateTransactionType = icBankStateTransactionType

      each BankStateLine (conditional-join) where
BankStateLine.Company_Id = iiCompanyId AND
BankStateLine.BankState_ID = BankState.BankState_ID AND
string(BankStateLine1.BankStateLine_ID) can-do icCanDoBankStateLines

          each BankStateAlloc (conditional-join) where
BankStateAlloc.Company_Id = iiCompanyId AND
BankStateAlloc.BankStateLine_ID = BankStateLine.BankStateLine_ID AND

              first CInvoice (outer-join) where
CInvoice.Company_Id = iiCompanyId AND
CInvoice.CInvoice_ID = BankStateAlloc.CInvoice_ID AND

                  first Creditor (outer-join) where
Creditor.SharedSet_Id = vi_CREDITOR_sharedset(iiCompanyId) AND
Creditor.Creditor_ID = CInvoice.Creditor_ID AND

              first DInvoice (outer-join) where
DInvoice.Company_Id = iiCompanyId AND
DInvoice.DInvoice_ID = BankStateAlloc.DInvoice_ID AND

                  first Debtor (outer-join) where
Debtor.SharedSet_Id = vi_DEBTOR_sharedset(iiCompanyId) AND
Debtor.Debtor_ID = DInvoice.Debtor_ID AND

              first Posting1 (outer-join) where
Posting1.Company_Id = iiCompanyId AND
Posting1.Posting_ID = BankStateAlloc.Posting_ID AND

          first Posting2 (conditional-join) where
Posting2.Company_Id = iiCompanyId AND
Posting2.Posting_ID = BankStateLine.Posting_ID AND

              each PostingLine (conditional-join) where
PostingLine.Company_Id = iiCompanyId AND
PostingLine.Posting_ID = Posting2.Posting_ID AND

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

                  first GL (conditional-join) where
GL.SharedSet_Id = vi_GL_sharedset(iiCompanyId) AND
GL.GL_ID = PostingLine.GL_ID AND

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


query resultset tqBaseCashOperation


field namedata typedb fielddescription
ttBankStateLinePostingDatedateBankStateLine.BankStateLinePostingDatePosting Date
tcLastModifiedUsercharacterBankStateLine.LastModifiedUserLast Modified User
tiBankStateLine_IDintegerBankStateLine.BankStateLine_IDRecord ID
tcBankStateLineInOutcharacterBankStateLine.BankStateLineInOutIn/Out
tdBankStateLineAmountTCdecimalBankStateLine.BankStateLineAmountTCTC Amount
tcBankStateLineDescriptioncharacterBankStateLine.BankStateLineDescriptionDescription
tcBankStateLineInformationcharacterBankStateLine.BankStateLineInformationInformation
tiAloccPosting_IDintegerBankStateAlloc.Posting_IDLink to Posting
tdBankStateAllocBankAmountTCdecimalBankStateAlloc.BankStateAllocBankAmountTCTC Bank Amt
tiCInvoice_IDintegerBankStateAlloc.CInvoice_IDLink to CInvoice
tiDInvoice_IDintegerBankStateAlloc.DInvoice_IDLink to DInvoice
tiBankStateAlloc_IDintegerBankStateAlloc.BankStateAlloc_IDRecord ID
tiAlocPostingVoucherintegerPosting1.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.
tiAlocPostingYearintegerPosting1.PostingYearThe GL calendar year for the posting.
tiAlocPeriod_IDintegerPosting1.Period_IDLink to Period
tiAlocJournal_IDintegerPosting1.Journal_IDDaybook Code
tiDInvoiceVoucherintegerDInvoice.DInvoiceVoucherVoucher.This field displays the numeric identifier assigned to the posting.
When the daybook of the journal entry is charged(after transfer), the voucher is cleared.
Voucher must be unique in one GL period.
When the user input is zero, the system automatically assign a value not used yet for this field.
tiDInvJournal_IDintegerDInvoice.Journal_IDDaybook Code
tiDInvPeriod_IDintegerDInvoice.Period_IDLink to Period
tiDebBusRel_IDintegerDebtor.BusinessRelation_IDBusiness Relation
tiCInvoiceVoucherintegerCInvoice.CInvoiceVoucherVoucher. This field displays the numeric identifier assigned to the posting.
When the daybook of the journal entry is changed (after transfer), the voucher is cleared.
Voucher must be unique in one GL period.
When the user input is zero, the system automatically assign a value not used yet for this field.
tiCInvJournal_IDintegerCInvoice.Journal_IDDaybook Code
tiCInvPeriod_IDintegerCInvoice.Period_IDLink to Period
tiCrBusRel_IDintegerCreditor.BusinessRelation_IDName
ttPostingDatedatePosting2.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).
tiPostingVoucherintegerPosting2.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.
tiPostingYearintegerPosting2.PostingYearThe GL calendar year for the posting.
tiJournal_IDintegerPosting2.Journal_IDDaybook Code
tiPeriod_IDintegerPosting2.Period_IDLink to Period
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
tcPostingLineTextcharacterPostingLine.PostingLineTextDescription
api annotation:Value for this field defaults to blank. Note: if a new record is created through the user interface, the default value is as same as the value of "PostingText" of tPosting.
tiPostingLine_IDintegerPostingLine.PostingLine_IDRecord ID
tiCurrencyNumberOfDecimalsPostintegerCurrency1.CurrencyNumberOfDecimalsNumber of Decimals
tcPostingLineCurrencycharacterCurrency1.CurrencyCodeCurrency Code
tcGLCodecharacterGL.GLCodeA code identifying the GL account.
tiCurrencyNumberOfDecimalsintegerCurrency2.CurrencyNumberOfDecimalsNumber of Decimals
tcCurrencyCodecharacterCurrency2.CurrencyCodeCurrency Code
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(BankState),rowid(BankStateLine),rowid(BankStateAlloc),rowid(CInvoice),rowid(Creditor),rowid(DInvoice),rowid(Debtor),rowid(Posting1),rowid(Posting2),rowid(PostingLine),rowid(Currency1),rowid(GL),rowid(Currency2)


Internal usage


QadFinancials
method BCashBoxReport.CashPaid
method BCashBoxReport.CashReceived