project QadFinancials > class BProjectReport > business logic query BaseCreditorAAByProject


Parameters


iiCompanyIdintegerCompany id
iiAccPeriodinteger
icCandoBRcharacter
icFromBRcharacter
icToBRcharacter
icCandoCreditorcharacter
icFromCreditorcharacter
icToCreditorcharacter
icCandoDivisioncharacter
icFromDivisioncharacter
icToDivisioncharacter
icCandoProjectcharacter
icFromProjectcharacter
icToProjectcharacter
icCandoJournalcharacter
icFromJournalcharacter
icToJournalcharacter
icCurrencyCodecharacter
icCandoProjectManagercharacter
icFromProjectManagercharacter
icToProjectManagercharacter


query condition


  each Creditor where
Creditor.SharedSet_Id = vi_CREDITOR_sharedset(iiCompanyId) AND
Creditor.CreditorCode can-do icCandoCreditor AND
Creditor.CreditorCode >= icFromCreditor AND
Creditor.CreditorCode <= icToCreditor

      first BusinessRelation (inner-join) where
BusinessRelation.BusinessRelation_ID = Creditor.BusinessRelation_ID AND
BusinessRelation.BusinessRelationCode can-do icCandoBR AND
BusinessRelation.BusinessRelationCode >= icFromBR AND
BusinessRelation.BusinessRelationCode <= icToBR

          each Address (conditional-join) where
Address.BusinessRelation_ID = BusinessRelation.BusinessRelation_ID AND

              each Contact (conditional-join) where
Contact.Address_ID = Address.Address_ID AND

      each CInvoice (conditional-join) where
CInvoice.Company_Id = iiCompanyId AND
CInvoice.Creditor_ID = Creditor.Creditor_ID AND
CInvoice.CInvoiceIsOpen = true

          first Currency (conditional-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 can-do icCandoDivision AND
Division.DivisionCode >= icFromDivision AND
Division.DivisionCode <= icToDivision

          first Journal (conditional-join) where
Journal.SharedSet_Id = vi_JOURNAL_sharedset(iiCompanyId) AND
Journal.Journal_ID = CInvoice.Journal_ID AND
Journal.JournalCode can-do icCandoJournal AND
Journal.JournalCode >= icFromJournal AND
Journal.JournalCode <= icToJournal

          first Period (conditional-join) where
Period.Company_Id = iiCompanyId AND
Period.Period_ID = CInvoice.Period_ID AND
Period.PeriodYearPeriod <= iiAccPeriod

          first Project (conditional-join) where
Project.SharedSet_Id = vi_PROJECT_sharedset(iiCompanyId) AND
Project.Project_ID = CInvoice.Project_ID AND
Project.ProjectCode can-do icCandoProject AND
Project.ProjectCode >= icFromProject AND
Project.ProjectCode <= icToProject

              first Usr (conditional-join) where
Usr.Usr_ID = Project.ProjectManagerUsr_ID AND
Usr.UsrName can-do icCandoProjectManager AND
Usr.UsrName >= icFromProjectManager AND
Usr.UsrName <= icToProjectManager

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

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


query resultset tqBaseCreditorAAByProject


field namedata typedb fielddescription
tcAddressCitycharacterAddress.AddressCityCity. The city for this address. This field can be used to decide the tax zone of the address.
tcAddressCountycharacterAddress.AddressCountyObsolete field
tcAddressEMailcharacterAddress.AddressEMailE-Mail. This field indicates the e-mail address associated with this business relation.
This field can be blank.
tcAddressFaxcharacterAddress.AddressFaxFax. This field indicates the fax or telex number to use when sending documents to this address.
This field can be balnk.
tcAddressStreet1characterAddress.AddressStreet1Address: Line one of address details.
This field can be blank.
tcAddressStreet2characterAddress.AddressStreet2Address.Line two of address details.
This field can be blank.
tcAddressTelephonecharacterAddress.AddressTelephoneTelephone. The telephone number for calling this business relation address.
This field can be blank.
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.
tiCInvoice_IDintegerCInvoice.CInvoice_IDRecord ID
tdCInvoiceBalanceCreditCCdecimalCInvoice.CInvoiceBalanceCreditCCBC 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.
tdCInvoiceBalanceCreditLCdecimalCInvoice.CInvoiceBalanceCreditLCBC 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.
tdCInvoiceBalanceCreditTCdecimalCInvoice.CInvoiceBalanceCreditTCTC Balance Amount CR. This field displays the sum of the credit amounts of all posting lines in transaction currency.
tdCInvoiceBalanceDebitCCdecimalCInvoice.CInvoiceBalanceDebitCCSC 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.
tdCInvoiceBalanceDebitLCdecimalCInvoice.CInvoiceBalanceDebitLCBC 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.
tdCInvoiceBalanceDebitTCdecimalCInvoice.CInvoiceBalanceDebitTCTC Balance Amount DR. This field displays the sum of the debit amounts of all posting lines in transaction currency.
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.
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.
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.
tcContactMobilePhonecharacterContact.ContactMobilePhoneMobile. The mobile phone number of the contact.
This field can be blank.
tcContactNamecharacterContact.ContactNameName. The full name of the contact.
This field is mandatory.
tcContactTelephonecharacterContact.ContactTelephoneTelephone. The telephone number of the contact.
This field can be blank.
tcCreditorCodecharacterCreditor.CreditorCodeSupplier Code
tiCurrency_IDintegerCurrency.Currency_IDRecord ID
tcCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
tcCurrencyDescriptioncharacterCurrency.CurrencyDescriptionCurrency Description
tiCurrencyNumberOfDecimalsintegerCurrency.CurrencyNumberOfDecimalsNumber of Decimals
tiDivision_IDintegerDivision.Division_IDRecord ID
tcDivisionCodecharacterDivision.DivisionCodeSub-Account
tcDivisionDescriptioncharacterDivision.DivisionDescriptionDescription
tcJournalCodecharacterJournal.JournalCodeA daybook code (maximum eight characters).
tiProfile_ID_CNintegerProfile2.Profile_IDRecord ID
tiPROFILE_ID_INVintegerProfile1.Profile_IDRecord ID
tcProfileCodecharacterProfile1.ProfileCodeA code (maximum 20 characters) that identifies a profile.
tcProfileCode2characterProfile2.ProfileCodeA code (maximum 20 characters) that identifies a profile.
tiProject_IDintegerProject.Project_IDRecord ID
tcProjectCodecharacterProject.ProjectCodeProject
tcProjectDescriptioncharacterProject.ProjectDescriptionDescription
tcUsrNamecharacterUsr.UsrNameUser Name
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(Creditor),rowid(BusinessRelation),rowid(Address),rowid(Contact),rowid(CInvoice),rowid(Currency),rowid(Division),rowid(Journal),rowid(Period),rowid(Project),rowid(Usr),rowid(Profile1),rowid(Profile2)


Internal usage


QadFinancials
method BProjectReport.CreditorAgeingAnalysisByProj