project QadFinancials > class BDDocumentReport > report query DDocumentForAll (optimised)


query filter (table tFilter)


tcBusinessFieldNametcDataTypetcOperator
iiCompanyIdi
iiDocumentYeari=
iiFromDocumentNumberi>=
iiToDocumentNumberi<=
icDocumentTypec=
icDocumentStatusc=
icDebtorCodec=
icDocumentReferencecbegins
ilDocumentIsOpenl=
itFromDueDatet>=
itToDueDatet<=
icCollectionNumberc=
icCurrencyCodec=
icDocumentSubTypec=
iiTimesPrintedi<
itFromCreationDatet>=
itTillCreationDatet<=
iiFromCreationTimei>=
iiTillCreationTimei<=
icUserNamec=
icIncSelCodec=
tBusinessRelation.BusinessRelationName1c=,>=,>,<>,<=,<,begins,can-do,matches
tBusinessRelation.BusinessRelationName2c=,>=,>,<>,<=,<,begins,can-do,matches
tCurrency.CurrencyCodec=,>=,>,<>,<=,<,begins,can-do,matches
tDCollection.DCollectionNamec=,>=,>,<>,<=,<,begins,can-do,matches
tDDocument.DDocumentCreationDatet=,>=,>,<>,<=,<
tDDocument.DDocumentDueDatet=,>=,>,<>,<=,<
tDDocument.DDocumentIsOpenl=,<>
tDDocument.DDocumentLastPrintDatet=,>=,>,<>,<=,<
tDDocument.DDocumentNumberi=,>=,>,<>,<=,<
tDDocument.DDocumentOriginalCreditCCd=,>=,>,<>,<=,<
tDDocument.DDocumentOriginalCreditLCd=,>=,>,<>,<=,<
tDDocument.DDocumentOriginalCreditTCd=,>=,>,<>,<=,<
tDDocument.DDocumentOriginalDebitCCd=,>=,>,<>,<=,<
tDDocument.DDocumentOriginalDebitLCd=,>=,>,<>,<=,<
tDDocument.DDocumentOriginalDebitTCd=,>=,>,<>,<=,<
tDDocument.DDocumentReferencec=,>=,>,<>,<=,<,begins,can-do,matches
tDDocument.DDocumentStatusc=,>=,>,<>,<=,<,begins,can-do,matches
tDDocument.DDocumentSubTypec=,>=,>,<>,<=,<,begins,can-do,matches
tDDocument.DDocumentTimesPrintedi=,>=,>,<>,<=,<
tDDocument.DDocumentTypec=,>=,>,<>,<=,<,begins,can-do,matches
tDDocument.DDocumentValueDaysi=,>=,>,<>,<=,<
tDDocument.DDocumentYeari=,>=,>,<>,<=,<
tLng.LngCodec=,>=,>,<>,<=,<,begins,can-do,matches
tLng.LngDescriptionc=,>=,>,<>,<=,<,begins,can-do,matches
tUsr.UsrNamec=,>=,>,<>,<=,<,begins,can-do,matches


Parameters (internal)


iiCompanyIdintegerCompany id
iiDocumentYearinteger
iiFromDocumentNumberinteger
iiToDocumentNumberinteger
icDocumentTypecharacter
icDocumentStatuscharacter
icDebtorCodecharacter
icDocumentReferencecharacter
ilDocumentIsOpenlogical
itFromDueDatedate
itToDueDatedate
icCollectionNumbercharacter
icCurrencyCodecharacter
icDocumentSubTypecharacter
iiTimesPrintedinteger
itFromCreationDatedate
itTillCreationDatedate
iiFromCreationTimeinteger
iiTillCreationTimeinteger
icUserNamecharacter
icIncSelCodecharacter


query condition


  each DDocument where
DDocument.Company_Id = iiCompanyId AND
DDocument.DDocumentYear = iiDocumentYear AND
DDocument.DDocumentNumber >= iiFromDocumentNumber AND
DDocument.DDocumentNumber <= iiToDocumentNumber AND
DDocument.DDocumentType = icDocumentType AND
DDocument.DDocumentStatus = icDocumentStatus AND
DDocument.DDocumentReference begins icDocumentReference AND
DDocument.DDocumentIsOpen = ilDocumentIsOpen AND
DDocument.DDocumentDueDate >= itFromDueDate AND
DDocument.DDocumentDueDate <= itToDueDate AND
DDocument.DDocumentSubType = icDocumentSubType AND
DDocument.DDocumentTimesPrinted < iiTimesPrinted AND
DDocument.DDocumentCreationDate >= itFromCreationDate AND
DDocument.DDocumentCreationDate <= itTillCreationDate AND
DDocument.DDocumentCreationTime >= iiFromCreationTime AND
DDocument.DDocumentCreationTime <= iiTillCreationTime AND
DDocument.DDocumentIncassoSelectCode = icIncSelCode

      first Currency (inner-join) where
Currency.Currency_ID = DDocument.Currency_ID AND
Currency.CurrencyCode = icCurrencyCode

      first DCollection (conditional-join) where
DCollection.Company_Id = iiCompanyId AND
DCollection.DCollection_ID = DDocument.DCollection_ID AND
DCollection.DCollectionNumber = icCollectionNumber

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

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

              first Lng (inner-join) where
Lng.Lng_ID = BusinessRelation.Lng_ID AND

      first Usr (conditional-join) where
Usr.Usr_ID = DDocument.CreationUsr_ID AND
Usr.UsrName = icUserName


query resultset tqDDocumentForAll


field namedata typedb fielddescription
tiBankNumber_IDintegerDDocument.BankNumber_IDLink to BankNumber
tiBusinessRelation_IDintegerDebtor.BusinessRelation_IDBusiness Relation
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_IDintegerDDocument.Company_IDLink to Company
tiCurrency_IDintegerDDocument.Currency_IDCurrency Code
tcCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
tiDCollection_IDintegerDDocument.DCollection_IDLink to DCollection
tcDCollectionNamecharacterDCollection.DCollectionNameName
tiDDocument_IDintegerDDocument.DDocument_IDRecord ID
ttDDocumentCreationDatedateDDocument.DDocumentCreationDateCreation Date.This field indicate the payment creation date.
This field is read-only.
ttDDocumentDueDatedateDDocument.DDocumentDueDateDue Date. The date on which the payment is receivable.
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.
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.
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.
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
tiGL_IDintegerDDocument.GL_IDBank Account
tiLng_IDintegerLng.Lng_IDRecord ID
tcLngCodecharacterLng.LngCodeLanguage Code
tcLngDescriptioncharacterLng.LngDescriptionDescription
tcUsrNamecharacterUsr.UsrNameUser Name
DDocumentCustomcharactercalculatedcustom fields
CurrencyCustomcharactercalculatedcustom fields
DCollectionCustomcharactercalculatedcustom fields
DebtorCustomcharactercalculatedcustom fields
BusinessRelationCustomcharactercalculatedcustom fields
LngCustomcharactercalculatedcustom fields
UsrCustomcharactercalculatedcustom fields
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(DDocument),rowid(Currency),rowid(DCollection),rowid(Debtor),rowid(BusinessRelation),rowid(Lng),rowid(Usr)


Internal usage


QadFinancials
method BDDocumentReport.DDocumentReportAll