project QadFinancials > class BCCollectionReport > business logic query CCollectionByReference


Parameters


iiCompanyIdintegerCompany id
itFromCreationDatedate
itTillCreationDatedate
iiFromCreationTimeinteger
iiTillCreationTimeinteger
icUsercharacter
idFromAmountdecimal
idTillAmountdecimal
icPaySelCodeListcharacter
ilIsExecutedlogical
ilIsAutomaticlogical
icGLCodecharacter


query condition


  each CCollection where
CCollection.Company_Id = iiCompanyId AND
CCollection.CCollectionCreationDate >= itFromCreationDate AND
CCollection.CCollectionCreationDate <= itTillCreationDate AND
CCollection.CCollectionCreationTime >= iiFromCreationTime AND
CCollection.CCollectionCreationTime <= iiTillCreationTime AND
CCollection.CCollectionBalanceTC >= idFromAmount AND
CCollection.CCollectionBalanceTC <= idTillAmount AND
CCollection.CCollectionPaySelCodeList = icPaySelCodeList AND
CCollection.CCollectionIsAutomatic = ilIsAutomatic AND
CCollection.CCollectionIsExecuted = ilIsExecuted

      each CDocument (conditional-join) where
CDocument.Company_Id = iiCompanyId AND
CDocument.CCollection_ID = CCollection.CCollection_ID AND

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

              first BusinessRelation (outer-join) where
BusinessRelation.BusinessRelation_ID = Creditor.BusinessRelation_ID AND

          first Currency1 (outer-join) where
Currency1.Currency_ID = CDocument.Currency_ID AND

          first GL1 (outer-join) where
GL1.SharedSet_Id = vi_GL_sharedset(iiCompanyId) AND
GL1.GL_ID = CDocument.GL_ID AND

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

          first Currency2 (conditional-join) where
Currency2.Currency_ID = GL2.Currency_ID AND

      first Usr (conditional-join) where
Usr.Usr_ID = CCollection.CreationUsr_ID AND
Usr.UsrName = icUser


query resultset tqCCollectionByReference


field namedata typedb fielddescription
tcBankCurrencycharacterCurrency2.CurrencyCodeCurrency Code
tiBusinessRelation_IDintegerCreditor.BusinessRelation_IDName
tcBusinessRelationCodecharacterBusinessRelation.BusinessRelationCodeBusiness Relation. A code to identify the business relation.
If this field does not have a input from the user, the system automatically generates a number for the record based on the sequence defined in Business Relation Autonumber Create.
tcBusinessRelationName1characterBusinessRelation.BusinessRelationName1Name: The full name of the business relation.
This field sets the default name for linked addresses such as customers and suppliers.
api annotation:PartialUpdate = yes - defaults to the BusinessRelationCode.
tcBusinessRelationName2characterBusinessRelation.BusinessRelationName2Second Name. An extended name when the Name field is not large enough to contain all information.
This fielsd can be blank.
tdCCollectionBalanceCreditLCdecimalCCollection.CCollectionBalanceCreditLCBC Credit Balance
tdCCollectionBalanceDebitLCdecimalCCollection.CCollectionBalanceDebitLCBC Debit Balance
tdCCollectionBalanceLCdecimalCCollection.CCollectionBalanceLCBC Balance
tdCCollectionBalanceTCdecimalCCollection.CCollectionBalanceTCTC Balance
ttCCollectionCreationDatedateCCollection.CCollectionCreationDateCreation Date
tiCCollectionCreationTimeintegerCCollection.CCollectionCreationTimeCreation Time
tiCCollectionGL_IDintegerGL2.GL_IDRecord ID
tlCCollectionIsAutomaticlogicalCCollection.CCollectionIsAutomaticAutomatic
tlCCollectionIsExecutedlogicalCCollection.CCollectionIsExecutedExecuted
tiCCollectionNumberintegerCCollection.CCollectionNumberNumber
tcCCollectionPaySelCodeListcharacterCCollection.CCollectionPaySelCodeListPayment Selection List
tcCCollectionReferencecharacterCCollection.CCollectionReferenceReference
tiCCollectionYearintegerCCollection.CCollectionYearYear
tcCDocGLCodecharacterGL1.GLCodeA code identifying the GL account.
tdCDocumentBankChargeAmountCCdecimalCDocument.CDocumentBankChargeAmountCCSC Bank Charge Amt
tdCDocumentBankChargeAmountLCdecimalCDocument.CDocumentBankChargeAmountLCBC Bank Charge Amt
tdCDocumentBankChargeAmountTCdecimalCDocument.CDocumentBankChargeAmountTCTC Bank Charge Amt
tdCDocumentBankChargeTaxAmountCCdecimalCDocument.CDocumentBankChargeTaxAmountCCSC Bank Charge Tax
tdCDocumentBankChargeTaxAmountLCdecimalCDocument.CDocumentBankChargeTaxAmountLCBC Bank Charge Tax
tdCDocumentBankChargeTaxAmountTCdecimalCDocument.CDocumentBankChargeTaxAmountTCTC Bank Charge Tax
ttCDocumentCreationDatedateCDocument.CDocumentCreationDateCreation Date.This field indicate the payment creation date.
This field is read-only.
ttCDocumentDueDatedateCDocument.CDocumentDueDateDue Date. The due date for this payment.
ttCDocumentLastPrintDatedateCDocument.CDocumentLastPrintDateLast Printed Date. This field indicates the most recent printing date.
tiCDocumentNumberintegerCDocument.CDocumentNumberDocument Number. This field hold a unified number for report use.
tdCDocumentOriginalCreditLCdecimalCDocument.CDocumentOriginalCreditLCBC Original Credit.This field holds the amount of the Payment in baisc currency.
tdCDocumentOriginalCreditTCdecimalCDocument.CDocumentOriginalCreditTCAmount.This field hold the value of the payment in the transaction currency. This field must be positive and can be entered manually or automatically by linking the payment to an open item.
tdCDocumentOriginalDebitLCdecimalCDocument.CDocumentOriginalDebitLCTC Original Debit. This field holds the debit value of the payment in base currency.
tdCDocumentOriginalDebitTCdecimalCDocument.CDocumentOriginalDebitTCTC Original Debit. This field holds the debit value of the payment in transaction currency.
tcCDocumentReferencecharacterCDocument.CDocumentReferenceReference. Reference text for the payment.
tcCDocumentStatuscharacterCDocument.CDocumentStatusStatus. The payment status. The default value for a new record is Initial.
tiCDocumentTimesPrintedintegerCDocument.CDocumentTimesPrintedTimes Printed.This field indicates the number of times the payment has been printed.
This field is read-only.
tcCDocumentTypecharacterCDocument.CDocumentTypePayment Instrument.This field displays the payment instrument associated with the payment format linked to the supplier bank.
tiCDocumentValueDaysintegerCDocument.CDocumentValueDaysValue Days. The number of days required by the bank to process the transaction. The default is based on the CDocumentStatus.
tiCDocumentYearintegerCDocument.CDocumentYearYear/Number. This field displays the accounting year and payment sequence number, which is automatically generated by the accounting year.
tiCompany_IDintegerCCollection.Company_IDLink to Company
tiCreationUsr_IDintegerCCollection.CreationUsr_IDLink to Usr
tiCreditor_IDintegerCDocument.Creditor_IDSupplier
tiCreditor_ID2integerCreditor.Creditor_IDRecord ID
tcCreditorCodecharacterCreditor.CreditorCodeSupplier Code
tiCurrency_IDintegerCurrency1.Currency_IDRecord ID
tiCurrency_ID1integerCurrency2.Currency_IDRecord ID
tcCurrencyCodecharacterCurrency1.CurrencyCodeCurrency Code
tcCurrencyDescriptioncharacterCurrency1.CurrencyDescriptionCurrency Description
tcCurrencyDescription2characterCurrency2.CurrencyDescriptionCurrency Description
tiCurrencyNumberOfDecimalsintegerCurrency2.CurrencyNumberOfDecimalsNumber of Decimals
tiGL_IDintegerGL1.GL_IDRecord ID
tcGLCodecharacterGL2.GLCodeA code identifying the GL account.
tcGLDescriptioncharacterGL1.GLDescriptionA description of the GL account.
tcGLDescription2characterGL2.GLDescriptionA description of the GL account.
ttLastModifiedDatedateCCollection.LastModifiedDateLast Modified Date
tcLastModifiedUsercharacterCCollection.LastModifiedUserLast Modified User
tcUsrNamecharacterUsr.UsrNameUser Name
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(CCollection),rowid(CDocument),rowid(Creditor),rowid(BusinessRelation),rowid(Currency1),rowid(GL1),rowid(GL2),rowid(Currency2),rowid(Usr)


Internal usage


QadFinancials
method BCCollectionReport.CCollectionReport