project QadFinancials > class BDebtorReport > report query BaseDebtorOpenItems (optimised)


query filter (table tFilter)


tcBusinessFieldNametcDataTypetcOperator
iiCompanyIdi
icFromDebtorCodec>=
icToDebtorCodec<=
icCandoDebtorCodeccan-do
icFromBRCodec>=
icToBRCodec<=
icCandoBRCodeccan-do
icFromJournalCodec>=
icToJournalCodec<=
icCandoJournalCodeccan-do
icCurrencyCodec=
icReasonCodeccan-do
ilActiveDebtorsl=
ilWithRemindersl=
tBusinessRelation.BusinessRelationCodec=,>=,>,<>,<=,<,begins,can-do,matches
tBusinessRelation.BusinessRelationName1c=,>=,>,<>,<=,<,begins,can-do,matches
tBusinessRelation.BusinessRelationName2c=,>=,>,<>,<=,<,begins,can-do,matches
tBusinessRelation.BusinessRelationSearchNamec=,>=,>,<>,<=,<,begins,can-do,matches
tCompany.CompanyCodec=,>=,>,<>,<=,<,begins,can-do,matches
tCurrency.CurrencyCodec=,>=,>,<>,<=,<,begins,can-do,matches
tCurrency.CurrencyDescriptionc=,>=,>,<>,<=,<,begins,can-do,matches
tCurrency.CurrencyNumberOfDecimalsi=,>=,>,<>,<=,<
tDebtor.DebtorCodec=,>=,>,<>,<=,<,begins,can-do,matches
tDInvoice.DInvoiceBalanceCCd=,>=,>,<>,<=,<
tDInvoice.DInvoiceBalanceCreditCCd=,>=,>,<>,<=,<
tDInvoice.DInvoiceBalanceCreditLCd=,>=,>,<>,<=,<
tDInvoice.DInvoiceBalanceCreditTCd=,>=,>,<>,<=,<
tDInvoice.DInvoiceBalanceDebitCCd=,>=,>,<>,<=,<
tDInvoice.DInvoiceBalanceDebitLCd=,>=,>,<>,<=,<
tDInvoice.DInvoiceBalanceDebitTCd=,>=,>,<>,<=,<
tDInvoice.DInvoiceBalanceLCd=,>=,>,<>,<=,<
tDInvoice.DInvoiceBalanceTCd=,>=,>,<>,<=,<
tDInvoice.DInvoiceDatet=,>=,>,<>,<=,<
tDInvoice.DInvoiceDescriptionc=,>=,>,<>,<=,<,begins,can-do,matches
tDInvoice.DInvoiceDiscountDueDatet=,>=,>,<>,<=,<
tDInvoice.DInvoiceDITextc=,>=,>,<>,<=,<,begins,can-do,matches
tDInvoice.DInvoiceDueDatet=,>=,>,<>,<=,<
tDInvoice.DInvoiceGoldenTaxInvoiceListc=,>=,>,<>,<=,<,begins,can-do,matches
tDInvoice.DinvoiceLastReminderDatet=,>=,>,<>,<=,<
tDInvoice.DInvoiceLegalDocumentListc=,>=,>,<>,<=,<,begins,can-do,matches
tDInvoice.DInvoiceOriginalCreditCCd=,>=,>,<>,<=,<
tDInvoice.DInvoiceOriginalCreditLCd=,>=,>,<>,<=,<
tDInvoice.DInvoiceOriginalCreditTCd=,>=,>,<>,<=,<
tDInvoice.DInvoiceOriginalDebitCCd=,>=,>,<>,<=,<
tDInvoice.DInvoiceOriginalDebitLCd=,>=,>,<>,<=,<
tDInvoice.DInvoiceOriginalDebitTCd=,>=,>,<>,<=,<
tDInvoice.DInvoicePostingDatet=,>=,>,<>,<=,<
tDInvoice.DInvoiceReminderCounti=,>=,>,<>,<=,<
tDInvoice.DInvoiceSalesOrderListc=,>=,>,<>,<=,<,begins,can-do,matches
tDInvoice.DInvoiceShipperListc=,>=,>,<>,<=,<,begins,can-do,matches
tDInvoiceStage.DInvoiceStageAmountCCd=,>=,>,<>,<=,<
tDInvoiceStage.DInvoiceStageAmountLCd=,>=,>,<>,<=,<
tDInvoiceStage.DInvoiceStageAmountTCd=,>=,>,<>,<=,<
tDInvoiceStage.DInvoiceStageAmtAppliedTCd=,>=,>,<>,<=,<
tDInvoiceStage.DInvoiceStageDiscDatet=,>=,>,<>,<=,<
tDInvoiceStage.DInvoiceStageDueDatet=,>=,>,<>,<=,<
tDInvoice.DInvoiceTSMNumberc=,>=,>,<>,<=,<,begins,can-do,matches
tDInvoice.DInvoiceTypec=,>=,>,<>,<=,<,begins,can-do,matches
tDInvoice.DInvoiceVoucheri=,>=,>,<>,<=,<
tDivision.DivisionCodec=,>=,>,<>,<=,<,begins,can-do,matches
tDivision.DivisionDescriptionc=,>=,>,<>,<=,<,begins,can-do,matches
tJournal.JournalCodec=,>=,>,<>,<=,<,begins,can-do,matches
tPaymentCondition.PaymentConditionCodec=,>=,>,<>,<=,<,begins,can-do,matches
tPeriod.PeriodPeriodi=,>=,>,<>,<=,<
tPeriod.PeriodYeari=,>=,>,<>,<=,<
tProfile1.ProfileCodec=,>=,>,<>,<=,<,begins,can-do,matches
tProfile2.ProfileCodec=,>=,>,<>,<=,<,begins,can-do,matches
tReason.ReasonIsLockPaymentl=,<>
tReason.ReasonIsNoReminderCountl=,<>


Parameters (internal)


iiCompanyIdintegerCompany id
icFromDebtorCodecharacterFromDebtorCode
icToDebtorCodecharacterToDebtorCode
icCandoDebtorCodecharacterCandoDebtorCode
icFromBRCodecharacterFromBRCode
icToBRCodecharacterToBRCode
icCandoBRCodecharacterCandoBRCode
icFromJournalCodecharacterFromJournalCode
icToJournalCodecharacterToJournalCode
icCandoJournalCodecharacterCandoJournalCode
icCurrencyCodecharacter
icReasonCodecharacter
ilActiveDebtorslogical
ilWithReminderslogical


query condition


  each Debtor where
Debtor.SharedSet_Id = vi_DEBTOR_sharedset(iiCompanyId) AND
Debtor.DebtorCode >= icFromDebtorCode AND
Debtor.DebtorCode <= icToDebtorCode AND
Debtor.DebtorCode can-do icCandoDebtorCode AND
Debtor.DebtorIsActive = ilActiveDebtors AND
Debtor.DebtorIsPrintReminder = ilWithReminders

      first BusinessRelation (inner-join) where
BusinessRelation.BusinessRelation_ID = Debtor.BusinessRelation_ID AND
BusinessRelation.BusinessRelationCode >= icFromBRCode AND
BusinessRelation.BusinessRelationCode <= icToBRCode AND
BusinessRelation.BusinessRelationCode can-do icCandoBRCode

      each DInvoice (inner-join) where
DInvoice.Company_Id = iiCompanyId AND
DInvoice.Debtor_ID = Debtor.Debtor_ID AND
DInvoice.DInvoiceIsOpen = true

          first Company (inner-join) where
Company.Company_Id = iiCompanyId AND
Company.Company_ID = DInvoice.Company_ID AND

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

          each DInvoiceStage (conditional-join) where
DInvoiceStage.DInvoice_ID = DInvoice.DInvoice_ID AND

          first Division (conditional-join) where
Division.SharedSet_Id = vi_DIVISION_sharedset(iiCompanyId) AND
Division.Division_ID = DInvoice.Division_ID AND

          first Journal (inner-join) where
Journal.SharedSet_Id = vi_JOURNAL_sharedset(iiCompanyId) AND
Journal.Journal_ID = DInvoice.Journal_ID AND
Journal.JournalCode >= icFromJournalCode AND
Journal.JournalCode <= icToJournalCode AND
Journal.JournalCode can-do icCandoJournalCode

          first PaymentCondition (inner-join) where
PaymentCondition.PaymentCondition_ID = DInvoice.NormalPaymentCondition_ID AND

          first Period (inner-join) where
Period.Company_Id = iiCompanyId AND
Period.Period_ID = DInvoice.Period_ID AND

          first Reason (inner-join) where
Reason.Reason_ID = DInvoice.Reason_ID AND
Reason.ReasonCode can-do icReasonCode

      first Profile1 (inner-join) where
Profile1.Profile_ID = Debtor.InvControlGLProfile_ID AND

      first Profile2 (inner-join) where
Profile2.Profile_ID = Debtor.CnControlGLProfile_ID AND


query resultset tqBaseDebtorOpenItems


field namedata typedb fielddescription
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.
tcBusinessRelationSearchNamecharacterBusinessRelation.BusinessRelationSearchNameSearch Name: An alternate name for finding the business relation. This field can be useful for sorting and filtering.
api annotation:PartialUpdate = yes - defaults to the BusinessRelationCode.
tcCnControlGLProfileCodecharacterProfile2.ProfileCodeA code (maximum 20 characters) that identifies a profile.
tiCnControlGLProfileIDintegerProfile2.Profile_IDRecord ID
tcCompanyCodecharacterCompany.CompanyCodeEntity Code
tiCurrency_IDintegerCurrency.Currency_IDRecord ID
tcCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
tcCurrencyDescriptioncharacterCurrency.CurrencyDescriptionCurrency Description
tiCurrencyNumberOfDecimalsintegerCurrency.CurrencyNumberOfDecimalsNumber of Decimals
tiDebtor_IDintegerDebtor.Debtor_IDRecord ID
tcDeductionStatuscharactercalculated
tiDInvoice_IDintegerDInvoice.DInvoice_IDRecord ID
tdDInvoiceBalanceCCdecimalDInvoice.DInvoiceBalanceCCSC Balance. This field displays the sum of the debit and credit amounts of all posting lines in statutory currency.
This field is calculated by the system using the TC Balance and the SC rate.
tdDInvoiceBalanceCreditCCdecimalDInvoice.DInvoiceBalanceCreditCCBC Balance Amount CR. This field displays the sum of the credit amounts of all posting lines in transaction currency.
This field is calculated by the system using the TC Base Amount CR and the SC rate.
tdDInvoiceBalanceCreditLCdecimalDInvoice.DInvoiceBalanceCreditLCBC Balance Amount CR. This field displays the sum of the credit amounts of all posting lines in transaction currency.
This field is calculated by the system using the TC Base Amount CR and the Exchange rate.
tdDInvoiceBalanceCreditTCdecimalDInvoice.DInvoiceBalanceCreditTCTC Balance Amount CR. This field displays the sum of the credit amounts of all posting lines in transaction currency.
tdDInvoiceBalanceDebitCCdecimalDInvoice.DInvoiceBalanceDebitCCSC Balance Amount DR. This field displays the sum of the debit amounts of all posting lines in statutory currency.
This field is calculated by the system using the TC Base Amount DR and the SC rate.
tdDInvoiceBalanceDebitLCdecimalDInvoice.DInvoiceBalanceDebitLCBC Balance Amount DR. This field displays the sum of the debit amounts of all posting lines in transaction currency.
This field is calculated by the system using the TC Base Amount DR and the Exchange rate.
tdDInvoiceBalanceDebitTCdecimalDInvoice.DInvoiceBalanceDebitTCTC Balance Amount DR. This field displays the sum of the debit amounts of all posting lines in transaction currency.
tdDInvoiceBalanceLCdecimalDInvoice.DInvoiceBalanceLCBC Balance. This field displays the sum of the debit and credit amounts of all posting lines in base currency.
This field is calculated by the system using the TC Balance and the Exchange rate.
tdDInvoiceBalanceTCdecimalDInvoice.DInvoiceBalanceTCBalance. This field displays the sum of the debit and credit amounts of all posting lines in transaction currency.
ttDInvoiceDatedateDInvoice.DInvoiceDateInvoice Date. This field indicates the invoice creation date.This field is normallly prior to the posting date and within the same accounting period as the posting date. The date must be within the upper and lower date limits of an open GL period.
The system uses the invoice date with the credit terms to calculate due date and discount date.
api annotation:This field defaults to the DInvoicePostingDate.
tcDInvoiceDescriptioncharacterDInvoice.DInvoiceDescriptionDescription. A brief description of the invoice. This field is mandatory.
ttDInvoiceDiscountDueDatedateDInvoice.DInvoiceDiscountDueDateDiscount Due Date. This field displays the last date a discount applies, calculated by the system based on the credit terms and the invoice date.
You can modify the due date without affecting the credit terms.
If the credit terms have a base date specified, this is used in the due date calculations rather than the invoice creation date.
tcDInvoiceDITextcharacterDInvoice.DInvoiceDITextCIDescription. A brief description for the SI posting.
api annotation:This field defaults from the DInvoiceDescription.
ttDInvoiceDueDatedateDInvoice.DInvoiceDueDateDue Date. This field displays the date when payment is due, calculated by the system based on the credit terms and the invoice date. User can modify the due date without affecting the credit terms.
If the credit terms have a base date specified, this is used in the due date calculations rather than the invoice creation date.
tcDInvoiceGoldenTaxInvoiceListcharacterDInvoice.DInvoiceGoldenTaxInvoiceListGolden Tax Invoices
ttDinvoiceLastReminderDatedateDInvoice.DinvoiceLastReminderDateLast Reminder Date.Date of last Customer Reminder Letter.
tcDInvoiceLegalDocumentListcharacterDInvoice.DInvoiceLegalDocumentListLegal Documents
tdDInvoiceOriginalCreditCCdecimalDInvoice.DInvoiceOriginalCreditCCSC Invoice Amount (CR). This field displays the credit total invoice amount in the statutory currency.
This field is calculated by the system using the TC Invoice Amount(CR) and the SC Rate.
tdDInvoiceOriginalCreditLCdecimalDInvoice.DInvoiceOriginalCreditLCBC Invoice Amount(CR). This field displays the credit total invoice amount in the base currency.
This field is calculated by the system using the TC Invoice Amount(CR) and the Exchange rate.
tdDInvoiceOriginalCreditTCdecimalDInvoice.DInvoiceOriginalCreditTCTC Invoice Amount CR. This field displays the credit total invoice amount in the transaction currency.
If you modify this field, the system automatically recalculates the exchange rate to ensure that the BC Invoice Amount remains the same.
tdDInvoiceOriginalDebitCCdecimalDInvoice.DInvoiceOriginalDebitCCSC Invoice Amount (DR). This field displays the debit total invoice amount in the statutory currency.
This field is calculated by the system using the TC Invoice Amount(CR) and the SC Rate.
tdDInvoiceOriginalDebitLCdecimalDInvoice.DInvoiceOriginalDebitLCBC Invoice Amount(DR). This field displays the debit total invoice amount in the base currency.
This field is calculated by the system using the TC Invoice Amount(DR) and the Exchange rate.
tdDInvoiceOriginalDebitTCdecimalDInvoice.DInvoiceOriginalDebitTCTC AP Amount. This field displays the debit total invoice amount in the transaction currency.
If you modify this field, the system automatically recalculates the exchange rate to ensure that the TC Invoice Amount remains the same.
ttDInvoicePostingDatedateDInvoice.DInvoicePostingDatePosting Date. This field displays the date the sales-related invoice was generated by Invoice Post and Print.
This field is updated when the invoice is validated and saved.
api annotation:This field defaults from the invoice creation date.
tiDInvoiceReminderCountintegerDInvoice.DInvoiceReminderCountReminder Counter. This field displays the reminder level that applies to this invoice.
tcDInvoiceSalesOrderListcharacterDInvoice.DInvoiceSalesOrderListSales Orders
tcDInvoiceShipperListcharacterDInvoice.DInvoiceShipperListShippers
tiDInvoiceStage_IDintegerDInvoiceStage.DInvoiceStage_IDRecord ID
tdDInvoiceStageAmountCCdecimalDInvoiceStage.DInvoiceStageAmountCCSC Amount. CInvoiceStageAmountSC Staged payments credit terms details of the invoice. The amount to pay in SC for this stage.
tdDInvoiceStageAmountLCdecimalDInvoiceStage.DInvoiceStageAmountLCBC Amount. CInvoiceStageAmountBC Staged payments credit terms details of the invoice. The amount to pay in BC for this stage.
tdDInvoiceStageAmountTCdecimalDInvoiceStage.DInvoiceStageAmountTCTC Amount. CInvoiceStageAmountTC Staged payments credit terms details of the invoice. The amount to pay in TC for this stage.
tdDInvoiceStageAmtAppliedTCdecimalDInvoiceStage.DInvoiceStageAmtAppliedTCTC Applied Amount. CInvoiceStageAmtAppliedTC Staged payments credit terms details of the invoice. The amount paid in TC for this stage.
ttDInvoiceStageDiscDatedateDInvoiceStage.DInvoiceStageDiscDateCInvoiceDiscDate Payment discount due date. When the invoice is paid before this date a payment discount can be given.
ttDInvoiceStageDueDatedateDInvoiceStage.DInvoiceStageDueDateDue Date. The date when this stage should end.
tcDInvoiceTSMNumbercharacterDInvoice.DInvoiceTSMNumberPayment Reference. This field contains a reference number to identify a customer payment for this invoice.
Normally this could be a unique transaction structured message (TSM) number. The TSM is a standard reference numbering system for electronic transfers,used by many banks.
tcDInvoiceTypecharacterDInvoice.DInvoiceTypeInvoice Type. This field displays the invoice type.
Invoice Correction and Credit Note Correction display as choices only when the appropriate daybook types have already been defined.
api annotation:PartialUpdate = yes - defaults to Invoice
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.
tiDivision_IDintegerDivision.Division_IDRecord ID
tcDivisionCodecharacterDivision.DivisionCodeSub-Account
tcDivisionDescriptioncharacterDivision.DivisionDescriptionDescription
tcInvControlGLProfileCodecharacterProfile1.ProfileCodeA code (maximum 20 characters) that identifies a profile.
tiInvControlGLProfileIDintegerProfile1.Profile_IDRecord ID
tcJournalCodecharacterJournal.JournalCodeA daybook code (maximum eight characters).
tcPaymentConditionCodecharacterPaymentCondition.PaymentConditionCodeCredit Terms Code
tiPeriodPeriodintegerPeriod.PeriodPeriodGL Period
tiPeriodYearintegerPeriod.PeriodYearGL Calendar Year
tcQADC01characterDInvoice.QADC01unused QAD reserved field
tdQADD01decimalDInvoice.QADD01unused QAD reserved field
tlReasonIsLockPaymentlogicalReason.ReasonIsLockPaymentLock Payment
tlReasonIsNoReminderCountlogicalReason.ReasonIsNoReminderCountDo not Increment Reminder Count
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.
DebtorCustomcharactercalculatedcustom fields
BusinessRelationCustomcharactercalculatedcustom fields
DInvoiceCustomcharactercalculatedcustom fields
CompanyCustomcharactercalculatedcustom fields
CurrencyCustomcharactercalculatedcustom fields
DInvoiceStageCustomcharactercalculatedcustom fields
DivisionCustomcharactercalculatedcustom fields
JournalCustomcharactercalculatedcustom fields
PaymentConditionCustomcharactercalculatedcustom fields
PeriodCustomcharactercalculatedcustom fields
ReasonCustomcharactercalculatedcustom fields
Profile1Customcharactercalculatedcustom fields
Profile2Customcharactercalculatedcustom fields
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(Debtor),rowid(BusinessRelation),rowid(DInvoice),rowid(Company),rowid(Currency),rowid(DInvoiceStage),rowid(Division),rowid(Journal),rowid(PaymentCondition),rowid(Period),rowid(Reason),rowid(Profile1),rowid(Profile2)


Internal usage


QadFinancials
method BDebtorReport.DebtorOpenItemsQuick
method BDebtorReport.DebtorReminders