project QadFinancials > class BDCollectionReport > business logic query DCollectionByReference


Parameters


iiCompanyIdintegerCompany id
idFromAmountdecimal
idTillAmountdecimal
itFromCreationDatedate
itTillCreationDatedate
iiFromCreationTimeinteger
iiTillCreationTimeinteger
icReferencecharacter
icUsercharacter
icIncSelCodecharacter
ilIsExecutedlogical
ilIsAutomaticlogical
icGLCodecharacter
icBankFileFormatcharacter


query condition


  each DCollection where
DCollection.Company_Id = iiCompanyId AND
DCollection.DCollectionCreationDate >= itFromCreationDate AND
DCollection.DCollectionCreationDate <= itTillCreationDate AND
DCollection.DCollectionBalanceLC >= idFromAmount AND
DCollection.DCollectionBalanceLC <= idTillAmount AND
DCollection.DCollectionReference = icReference AND
DCollection.DCollectionCreationTime >= iiFromCreationTime AND
DCollection.DCollectionCreationTime <= iiTillCreationTime AND
DCollection.DCollectionIncSelCodeList = icIncSelCode AND
DCollection.DCollectionIsAutomatic = ilIsAutomatic AND
DCollection.DCollectionIsExecuted = ilIsExecuted AND
DCollection.DCollectionBankFileFormat = icBankFileFormat

      each DDocument (inner-join) where
DDocument.Company_Id = iiCompanyId AND
DDocument.DCollection_ID = DCollection.DCollection_ID AND

          first GL1 (inner-join) where
GL1.SharedSet_Id = vi_GL_sharedset(iiCompanyId) AND
GL1.GL_ID = DDocument.GL_ID AND

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

          first Debtor (inner-join) where
Debtor.SharedSet_Id = vi_DEBTOR_sharedset(iiCompanyId) AND
Debtor.Debtor_ID = DDocument.Debtor_ID AND

              first BusinessRelation (inner-join) where
BusinessRelation.BusinessRelation_ID = Debtor.BusinessRelation_ID AND

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

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

      first Usr (inner-join) where
Usr.Usr_ID = DCollection.CreationUsr_ID AND
Usr.UsrName = icUser


query resultset tqDCollectionByReference


field namedata typedb fielddescription
tiBankNumber_IDintegerDDocument.BankNumber_IDLink to BankNumber
tiBusinessRelation_IDintegerDebtor.BusinessRelation_IDBusiness Relation
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.
tiCompany_IDintegerDCollection.Company_IDLink to Company
tiCurrency_IDintegerCurrency1.Currency_IDRecord ID
tiCurrency_ID1integerCurrency2.Currency_IDRecord ID
tcCurrencyCodecharacterCurrency1.CurrencyCodeCurrency Code
tcCurrencyCode2characterCurrency2.CurrencyCodeCurrency Code
tcCurrencyDescriptioncharacterCurrency1.CurrencyDescriptionCurrency Description
tcCurrencyDescription2characterCurrency2.CurrencyDescriptionCurrency Description
tiCurrencyNumberOfDecimalsintegerCurrency1.CurrencyNumberOfDecimalsNumber of Decimals
tiCurrencyNumberOfDecimals2integerCurrency2.CurrencyNumberOfDecimalsNumber of Decimals
tiDCollection_IDintegerDDocument.DCollection_IDLink to DCollection
tdDCollectionBalanceCreditLCdecimalDCollection.DCollectionBalanceCreditLCBC Credit Balance
tdDCollectionBalanceCreditTCdecimalDCollection.DCollectionBalanceCreditTCTC Credit Balance
tdDCollectionBalanceDebitLCdecimalDCollection.DCollectionBalanceDebitLCBC Debit Balance
tdDCollectionBalanceDebitTCdecimalDCollection.DCollectionBalanceDebitTCTC Debit Balance
tdDCollectionBalanceLCdecimalDCollection.DCollectionBalanceLCBC Balance
tdDCollectionBalanceTCdecimalDCollection.DCollectionBalanceTCTC Balance
tcDCollectionBankFileFormatcharacterDCollection.DCollectionBankFileFormatBank File Format
ttDCollectionCreationDatedateDCollection.DCollectionCreationDateCreation Date
tiDCollectionCreationTimeintegerDCollection.DCollectionCreationTimeCreation Time
tiDCollectionGL_IDintegerGL2.GL_IDRecord ID
tlDCollectionIsAutomaticlogicalDCollection.DCollectionIsAutomaticAutomatic
tlDCollectionIsExecutedlogicalDCollection.DCollectionIsExecutedExecuted
tiDCollectionNumberintegerDCollection.DCollectionNumberNumber
tcDCollectionReferencecharacterDCollection.DCollectionReference1099 Box Reference
tiDCollectionYearintegerDCollection.DCollectionYearYear/Customer Payment Selection Code
tiDDocument_IDintegerDDocument.DDocument_IDRecord ID
ttDDocumentClosingDatedateDDocument.DDocumentClosingDateClosing Date. The closing date of the payment.
ttDDocumentCreationDatedateDDocument.DDocumentCreationDateCreation Date.This field indicate the payment creation date.
This field is read-only.
tiDDocumentCreationTimeintegerDDocument.DDocumentCreationTimeCreation Time. The time payment is created.
ttDDocumentDueDatedateDDocument.DDocumentDueDateDue Date. The date on which the payment is receivable.
tdDDocumentExchangeRatedecimalDDocument.DDocumentExchangeRateExchange Rate. This field holds the exchange rate applying to the transaction currency.
tcDDocumentIncassoSelectCodecharacterDDocument.DDocumentIncassoSelectCodeCustomer Payment Selection Code. This field displays the customer payment selection code.
This field is read-only.
tlDDocumentIsOpenlogicalDDocument.DDocumentIsOpenOpen. This field indicates if the payment is completely paid already.
ttDDocumentLastPrintDatedateDDocument.DDocumentLastPrintDateLast Printed Date. This field indicates the most recent printing date.
tiDDocumentNumberintegerDDocument.DDocumentNumberDocument Number. This field hold a unified number for report use.
tdDDocumentOriginalCreditBCdecimalDDocument.DDocumentOriginalCreditBCBC Original Credit
tdDDocumentOriginalCreditCCdecimalDDocument.DDocumentOriginalCreditCCSC Original Credit. This field hold the amount of the payment in management currency.
tdDDocumentOriginalCreditLCdecimalDDocument.DDocumentOriginalCreditLCBC Original Credit.This field holds the amount of the Payment in baisc currency.
tdDDocumentOriginalCreditTCdecimalDDocument.DDocumentOriginalCreditTCTC Original Credit. This field holds the debit value of the payment in transaction currency.
tdDDocumentOriginalDebitBCdecimalDDocument.DDocumentOriginalDebitBCBC Original Debit
tdDDocumentOriginalDebitCCdecimalDDocument.DDocumentOriginalDebitCCTC Original Debit. This field holds the debit value of the payment in management currency.
tdDDocumentOriginalDebitLCdecimalDDocument.DDocumentOriginalDebitLCTC Original Debit. This field holds the debit value of the payment in base currency.
tdDDocumentOriginalDebitTCdecimalDDocument.DDocumentOriginalDebitTCAmount.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.
tdDDocumentRateScaledecimalDDocument.DDocumentRateScaleScale Factor. This field indicates the scaling factor applying to the transaction currency.
tcDDocumentReferencecharacterDDocument.DDocumentReferenceReference. Reference text for the payment.
tcDDocumentStatuscharacterDDocument.DDocumentStatusStatus. The payment status. The default value for a new record is Initial.
tcDDocumentSubTypecharacterDDocument.DDocumentSubTypeSubtype. This read-only field indicates that the payment is manual or automatic. You create manual customer payments through the Customer Payment activities, and automatic payments through the Customer Payment Selections.
tiDDocumentTimesPrintedintegerDDocument.DDocumentTimesPrintedTimes Printed.This field indicates the number of times the payment has been printed.
This field is read-only.
tcDDocumentTypecharacterDDocument.DDocumentTypePayment Instrument. The system displays the payment instrument associated with the payment format linked to the customer bank.
tiDDocumentValueDaysintegerDDocument.DDocumentValueDaysValue Days. A value for the number of days required by the bank to process the transaction. The default is based on the payment status entered.
tiDDocumentYearintegerDDocument.DDocumentYearYear/Number. This field displays the accounting year and payment sequence number, which is automatically generated by the accounting year.
tiDebtor_IDintegerDDocument.Debtor_IDCustomer
tiDebtor_ID2integerDebtor.Debtor_IDRecord ID
tcDebtorCodecharacterDebtor.DebtorCodeA code (maximum eight characters) that identifies a customer. If the code you specify matches an existing supplier code, a warning message displays. You can choose to ignore the warning, and create the record. However, when a supplier and customer share the same code, they must reference the same business relation.
api annotation:If you leave the Customer Code field blank, the system automatically generates a number for the record based on the sequence defined in Customer Autonumber Create.
tiDPaySel_IDintegerDDocument.DPaySel_IDLink to DPaySel
tiGL_IDintegerGL1.GL_IDRecord ID
tcGLCodecharacterGL1.GLCodeA code identifying the GL account.
tcGLCode2characterGL2.GLCodeA code identifying the GL account.
tcGLDescriptioncharacterGL1.GLDescriptionA description of the GL account.
tcGLDescription2characterGL2.GLDescriptionA description of the GL account.
ttLastModifiedDatedateDCollection.LastModifiedDateLast Modified Date
tcLastModifiedUsercharacterDCollection.LastModifiedUserLast Modified User
tcUsrNamecharacterUsr.UsrNameUser Name
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(DCollection),rowid(DDocument),rowid(GL1),rowid(Currency1),rowid(Debtor),rowid(BusinessRelation),rowid(GL2),rowid(Currency2),rowid(Usr)


Internal usage


QadFinancials
method BDCollectionReport.DCollectionReport