project QadFinancials > class BCreditorReport > business logic query BaseCreditorAgeingAnalBack


Parameters


iiCompanyIdintegerCompany id
icCandoCreditorCodecharacter
icCandoBRCodecharacter
icCandoDivisionCodecharacter
icCandoJournalCodecharacter
icCurrencyCodecharacter
icFromBRCodecharacter
icFromCreditorCodecharacter
icFromDivisionCodecharacter
icFromJournalCodecharacter
iiToAccPeriodinteger
icToBRCodecharacter
icToCreditorCodecharacter
icToDivisionCodecharacter
icToJournalCodecharacter
itAgeingDatedate
icFromGLCodecharacter
icToGLCodecharacter
icCanDoGLCodecharacter
icFromProjectCodecharacter
icToProjectCodecharacter
icCanDoProjectCodecharacter
icFromCCCodecharacter
icToCCCodecharacter
icCanDoCCCodecharacter
icFromPaymentGroupcharacter
icToPaymentGroupcharacter
icCandoPaymentGroupcharacter


query condition


  each Creditor where
Creditor.SharedSet_Id = vi_CREDITOR_sharedset(iiCompanyId) AND
Creditor.CreditorCode >= icFromCreditorCode AND
Creditor.CreditorCode <= icToCreditorCode AND
Creditor.CreditorCode can-do icCandoCreditorCode

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

      each CInvoice (inner-join) where
CInvoice.Company_Id = iiCompanyId AND
CInvoice.Creditor_ID = Creditor.Creditor_ID AND
CInvoice.CInvoiceClosingDate > itAgeingDate AND
CInvoice.CInvoiceIsInitialStatus <> true AND
CInvoice.CInvoicePostingYearPeriod <= iiToAccPeriod

          first CostCentre (conditional-join) where
CostCentre.SharedSet_Id = vi_COSTCENTRE_sharedset(iiCompanyId) AND
CostCentre.CostCentre_ID = CInvoice.CostCentre_ID AND
CostCentre.CostCentreCode >= icFromCCCode AND
CostCentre.CostCentreCode <= icToCCCode AND
CostCentre.CostCentreCode can-do icCanDoCCCode

          each CInvoiceMovement (conditional-join) where
CInvoiceMovement.Company_Id = iiCompanyId AND
CInvoiceMovement.CInvoice_ID = CInvoice.CInvoice_ID AND

              first PostingLine (conditional-join) where
PostingLine.Company_Id = iiCompanyId AND
PostingLine.PostingLine_ID = CInvoiceMovement.PostingLine_ID AND

                  first Posting (conditional-join) where
Posting.Company_Id = iiCompanyId AND
Posting.Posting_ID = PostingLine.Posting_ID AND
Posting.PostingDate <= itAgeingDate

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

          first Division (conditional-join) where
Division.SharedSet_Id = vi_DIVISION_sharedset(iiCompanyId) AND
Division.Division_ID = CInvoice.Division_ID AND
Division.DivisionCode >= icFromDivisionCode AND
Division.DivisionCode <= icToDivisionCode AND
Division.DivisionCode can-do icCandoDivisionCode

          first GL (inner-join) where
GL.SharedSet_Id = vi_GL_sharedset(iiCompanyId) AND
GL.GL_ID = CInvoice.ControlGL_ID AND
GL.GLCode >= icFromGLCode AND
GL.GLCode <= icToGLCode AND
GL.GLCode can-do icCanDoGLCode

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

          first Project (conditional-join) where
Project.SharedSet_Id = vi_PROJECT_sharedset(iiCompanyId) AND
Project.Project_ID = CInvoice.Project_ID AND
Project.ProjectCode >= icFromProjectCode AND
Project.ProjectCode <= icToProjectCode AND
Project.ProjectCode can-do icCanDoProjectCode

      first PaymentGroup (conditional-join) where
PaymentGroup.PaymentGroup_ID = Creditor.PaymentGroup_ID AND
PaymentGroup.PaymentGroupCode >= icFromPaymentGroup AND
PaymentGroup.PaymentGroupCode <= icToPaymentGroup AND
PaymentGroup.PaymentGroupCode can-do icCandoPaymentGroup


query resultset tqBaseCreditorAgeingAnalBack


field namedata typedb fielddescription
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.
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.
tiCInvoice_IDintegerCInvoice.CInvoice_IDRecord ID
ttCInvoiceDatedateCInvoice.CInvoiceDateInvoice Date. This field indicates the invoice creation date.
The system uses this field with the credit terms to calculate due date and discount date.
api annotation:This field defaults from the system date.
tcCInvoiceDescriptioncharacterCInvoice.CInvoiceDescriptionDescription. A brief description of the invoice. The system generates a default description based on the Reference and Supplier Code.
ttCInvoiceDiscountDueDatedateCInvoice.CInvoiceDiscountDueDateDiscount Due Date.This field indicates the last date a discount applies, calculated by the system based on the credit terms and the invoice date.
User can modify this field without affecting the credit terms.
ttCInvoiceDueDatedateCInvoice.CInvoiceDueDateDue Date.This field indicates the date when payment become due.
This field can be modified without affecting the credit terms.
This field is calculated by the system based on the credit terms and the invoice date.
tlCInvoiceIsLockPaymentlogicalCInvoice.CInvoiceIsLockPaymentLock Payment. This field indicates if the invoice is locked for payment. The invoice cannot be included in any automatic payment selections if this field is true.
api annotation:PartialUpdate = yes - defaults to false
tlCInvoiceIsSelectedlogicalCInvoice.CInvoiceIsSelectedSelected. This field indicates whether the invoice is included in a payment selection.
This field is read-only.
tdCInvoiceOriginalCreditCCdecimalCInvoice.CInvoiceOriginalCreditCCSC 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.
tdCInvoiceOriginalCreditLCdecimalCInvoice.CInvoiceOriginalCreditLCBC 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.
tdCInvoiceOriginalCreditTCdecimalCInvoice.CInvoiceOriginalCreditTCTC 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.
tdCInvoiceOriginalDebitCCdecimalCInvoice.CInvoiceOriginalDebitCCSC 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.
tdCInvoiceOriginalDebitLCdecimalCInvoice.CInvoiceOriginalDebitLCBC 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.
tdCInvoiceOriginalDebitTCdecimalCInvoice.CInvoiceOriginalDebitTCTC 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.
ttCInvoicePostingDatedateCInvoice.CInvoicePostingDatePosting Date. This filed indicates the date on which the invoice is to be posted.
api annotation:This field defaults from the invoice creation date.
tcCInvoiceReferencecharacterCInvoice.CInvoiceReferenceReference. An alphanumeric reference to help identify the invoice in the system.
This reference is typically the ID number of the invoice received from the supplier.
tcCInvoiceTSMNumbercharacterCInvoice.CInvoiceTSMNumberPayment Reference. This field displays a unique reference number to be included in the supplier payment file.
This reference can consist of a Transfer with Structured Message (TSM) number.
This field can be blank.
tcCInvoiceTypecharacterCInvoice.CInvoiceTypeInvoice Type. This field identifies the invoice type.
The value can be Invoice Correction and Credit Note Correction type only when the appropriate daybook types have already been defined.
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.
tcCostCentreCodecharacterCostCentre.CostCentreCodeCost Center: A code that identifies the cost center.
tiCreditor_IDintegerCreditor.Creditor_IDRecord ID
tcCreditorCodecharacterCreditor.CreditorCodeSupplier Code
tiCurrency_IDintegerCurrency.Currency_IDRecord ID
tcCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
tcCurrencyDescriptioncharacterCurrency.CurrencyDescriptionCurrency Description
tiDivision_IDintegerDivision.Division_IDRecord ID
tcDivisionCodecharacterDivision.DivisionCodeSub-Account
tcDivisionDescriptioncharacterDivision.DivisionDescriptionDescription
tiGL_IDintegerGL.GL_IDRecord ID
tcGLCodecharacterGL.GLCodeA code identifying the GL account.
tcGLDescriptioncharacterGL.GLDescriptionA description of the GL account.
tcJournalCodecharacterJournal.JournalCodeA daybook code (maximum eight characters).
tiPaymentGroup_IDintegerPaymentGroup.PaymentGroup_IDRecord ID
tcPaymentGroupCodecharacterPaymentGroup.PaymentGroupCodePayment Group
tcPaymentGroupDescriptioncharacterPaymentGroup.PaymentGroupDescriptionDescription
tiPeriodPeriodintegerCInvoice.CInvoicePostingPeriodGL Period.This field indicates the period when the invoice to be posted.
If this field is modified, the posting and tax dates are changed correspondingly.
api annotation:This field defaults to the period associated with the posting date.
tiPeriodYearintegerCInvoice.CInvoicePostingYearYear.This field indicates the accounting year for the invoice.
If you modify these fields, the posting and tax dates are changed correspondingly.
api annotation:This field defaults to the accounting year associated with the posting date.
tdPostingLineCreditCCdecimalPostingLine.PostingLineCreditCCSC Credit
api annotation:Partial Update = yes - it will get a default value depending on the value of PostingLinCreditTC, PostingLineCCRate & PostingLineCCScale.
SC Amount = TC Amount * Exchange rate (TC/SC) * Scale Factor (TC/SC). If Partial Update is false, you should enter the correct value for this field
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
tdPostingLineDebitCCdecimalPostingLine.PostingLineDebitCCSC Debit
api annotation:Partial Update = yes - it will get a default value depending on the value of PostingLineDebitTC, PostingLineCCRate & PostingLineCCScale.
SC Amount = TC Amount * Exchange rate (TC/SC) * Scale Factor (TC/SC). If Partial Update is false, enter the correct value for this field.
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
tcProjectCodecharacterProject.ProjectCodeProject


Internal usage


QadFinancials
method BCreditorReport.CreditorAgeingABackwards