project QadFinancials > class BPaymentSelectionReport > business logic query BaseRemittanceByCollCreditor


Parameters


iiCompanyIdintegerCompany id
iiAddressType_IDinteger
icCreditorCodescharacter
icFromPaySelcharacter
icToPaySelcharacter
icPaySelcharacter
ilIsRefInFilelogical
iiFromColYearinteger
iiTillColYearinteger
iiColYearinteger
iiFromColNumberinteger
iiToColNumberinteger
iiColNumberinteger
icFromColReferencecharacter
icToColReferencecharacter
icColReferencecharacter
itFromPaySelDatedate
itToPaySelDatedate
ilSendRemittancelogical


query condition


  each CCollection where
CCollection.Company_Id = iiCompanyId AND
CCollection.CCollectionNumber >= iiFromColNumber AND
CCollection.CCollectionNumber <= iiToColNumber AND
CCollection.CCollectionNumber = iiColNumber AND
CCollection.CCollectionYear >= iiFromColYear AND
CCollection.CCollectionYear <= iiTillColYear AND
CCollection.CCollectionYear = iiColYear AND
CCollection.CCollectionReference >= icFromColReference AND
CCollection.CCollectionReference <= icToColReference AND
CCollection.CCollectionReference = icColReference

      each CDocument (inner-join) where
CDocument.Company_Id = iiCompanyId AND
CDocument.CCollection_ID = CCollection.CCollection_ID AND

          each CDocumentInvoiceXref (inner-join) where
CDocumentInvoiceXref.CDocument_ID = CDocument.CDocument_ID AND

              first CInvoice (inner-join) where
CInvoice.Company_Id = iiCompanyId AND
CInvoice.CInvoice_ID = CDocumentInvoiceXref.CInvoice_ID AND
CInvoice.Company_ID <> 0 AND
CInvoice.Company_ID <> ?

                  first Creditor (inner-join) where
Creditor.SharedSet_Id = vi_CREDITOR_sharedset(iiCompanyId) AND
Creditor.Creditor_ID = CInvoice.Creditor_ID AND
Creditor.CreditorCode can-do icCreditorCodes AND
Creditor.CreditorIsSendRemittance = ilSendRemittance

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

                          each Address (outer-join) where
Address.BusinessRelation_ID = BusinessRelation.BusinessRelation_ID AND
Address.AddressType_ID = iiAddressType_ID

                              first Country (outer-join) where
Country.Country_ID = Address.Country_ID AND

                              first State (outer-join) where
State.State_ID = Address.State_ID AND

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

                  first Journal (inner-join) where
Journal.SharedSet_Id = vi_JOURNAL_sharedset(iiCompanyId) AND
Journal.Journal_ID = CInvoice.Journal_ID AND

                  first Period (inner-join) where
Period.Company_Id = iiCompanyId AND
Period.Period_ID = CInvoice.Period_ID AND
Period.Company_ID <> 0 AND
Period.Company_ID <> ?

              first PaySelLine (inner-join) where
PaySelLine.PaySelLine_ID = CDocumentInvoiceXref.PaySelLine_ID AND
PaySelLine.PaySelLineIsRefInFile = ilIsRefInFile

                  first BankNumber1 (outer-join) where
BankNumber1.BankNumber_ID = PaySelLine.BankNumber_ID AND

                  first PaySel (inner-join) where
PaySel.Company_Id = iiCompanyId AND
PaySel.PaySel_ID = PaySelLine.PaySel_ID AND
PaySel.PaySelCode >= icFromPaySel AND
PaySel.PaySelCode <= icToPaySel AND
PaySel.PaySelCode = icPaySel AND
PaySel.PaySelDate >= itFromPaySelDate AND
PaySel.PaySelDate <= itToPaySelDate

                      first GL (inner-join) where
GL.SharedSet_Id = vi_GL_sharedset(iiCompanyId) AND
GL.GL_ID = PaySel.GL_ID AND

                          each BankNumber2 (outer-join) where
BankNumber2.ParentObject_ID = GL.GL_ID AND


query resultset tqBaseRemittanceByCollCreditor


field namedata typedb fielddescription
tcAddressCitycharacterAddress.AddressCityCity. The city for this address. This field can be used to decide the tax zone of the address.
tcAddressStreet1characterAddress.AddressStreet1Address: Line one of address details.
This field can be blank.
tcAddressStreet2characterAddress.AddressStreet2Address.Line two of address details.
This field can be blank.
tcAddressZipcharacterAddress.AddressZipZip. The postal code or US zip code associated with this address.
This field is used to decide the tax zone for the address.
This field can be blank.
tcBankNumbercharacterBankNumber1.BankNumberBank Number
tcBankNumberExtensioncharacterBankNumber1.BankNumberExtensionBank Extension
tcBankNumberFormattedcharacterBankNumber1.BankNumberFormattedFormatted Bank Account No
tcBankNumberSwiftCodecharacterBankNumber1.BankNumberSwiftCodeSWIFT Code
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.
tiCCollection_IDintegerCCollection.CCollection_IDRecord ID
tcCCollectionNamecharacterCCollection.CCollectionNameName
tiCCollectionNumberintegerCCollection.CCollectionNumberNumber
tcCCollectionReferencecharacterCCollection.CCollectionReferenceReference
ttCCollectionRequestedDatedateCCollection.CCollectionRequestedDateRequested Date
tiCCollectionYearintegerCCollection.CCollectionYearYear
tiCInvoice_IDintegerCInvoice.CInvoice_IDRecord ID
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.
tdCInvoiceWHTTotAmtCreditCCdecimalCInvoice.CInvoiceWHTTotAmtCreditCCSC WHT Total Amount (CR)
tdCInvoiceWHTTotAmtCreditLCdecimalCInvoice.CInvoiceWHTTotAmtCreditLCBC WHT Total Amount (CR)
tdCInvoiceWHTTotAmtCreditTCdecimalCInvoice.CInvoiceWHTTotAmtCreditTCTC WHT Total Amount (CR)
tdCInvoiceWHTTotAmtDebitCCdecimalCInvoice.CInvoiceWHTTotAmtDebitCCSC WHT Total Amount (DR)
tdCInvoiceWHTTotAmtDebitLCdecimalCInvoice.CInvoiceWHTTotAmtDebitLCBC WHT Total Amount (DR)
tdCInvoiceWHTTotAmtDebitTCdecimalCInvoice.CInvoiceWHTTotAmtDebitTCTC WHT Total Amount (DR)
tcCompanyBankNumbercharacterBankNumber2.BankNumberBank Number
tcCompanyBankNumberExtensioncharacterBankNumber2.BankNumberExtensionBank Extension
tcCompanyBankNumberFormattedcharacterBankNumber2.BankNumberFormattedFormatted Bank Account No
tcCompanyBankNumberSwiftCodecharacterBankNumber2.BankNumberSwiftCodeSWIFT Code
tiCountry_IDintegerCountry.Country_IDRecord ID
tcCountryCodecharacterCountry.CountryCodeCountry Code
tcCountryDescriptioncharacterCountry.CountryDescriptionDescription
tcCreditorCodecharacterCreditor.CreditorCodeSupplier Code
tcCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
tiCurrencyNumberOfDecimalsintegerCurrency.CurrencyNumberOfDecimalsNumber of Decimals
tcGLCodecharacterGL.GLCodeA code identifying the GL account.
tdInvoiceBalanceCreditCCdecimalCInvoice.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.
tdInvoiceBalanceCreditLCdecimalCInvoice.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.
tdInvoiceBalanceCreditTCdecimalCInvoice.CInvoiceBalanceCreditTCTC Balance Amount CR. This field displays the sum of the credit amounts of all posting lines in transaction currency.
tdInvoiceBalanceDebitCCdecimalCInvoice.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.
tdInvoiceBalanceDebitLCdecimalCInvoice.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.
tdInvoiceBalanceDebitTCdecimalCInvoice.CInvoiceBalanceDebitTCTC Balance Amount DR. This field displays the sum of the debit amounts of all posting lines in transaction currency.
tcInvoiceContactcharacterCInvoice.CInvoiceContactContact. This field indicates the name of the purchasing contact in the supplier company.
api annotation:This field defaults from the Contact field of the invoice's supplier.
ttInvoiceDatedateCInvoice.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.
tcInvoiceDescriptioncharacterCInvoice.CInvoiceDescriptionDescription. A brief description of the invoice. The system generates a default description based on the Reference and Supplier Code.
tdInvoiceOriginalCreditCCdecimalCInvoice.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.
tdInvoiceOriginalCreditLCdecimalCInvoice.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.
tdInvoiceOriginalCreditTCdecimalCInvoice.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.
tdInvoiceOriginalDebitCCdecimalCInvoice.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.
tdInvoiceOriginalDebitLCdecimalCInvoice.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.
tdInvoiceOriginalDebitTCdecimalCInvoice.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.
tcInvoiceReferencecharacterCInvoice.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.
tcInvoiceTypecharacterCInvoice.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.
tiInvoiceVoucherintegerCInvoice.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.
tcJournalCodecharacterJournal.JournalCodeA daybook code (maximum eight characters).
tcPayFormatTypeCodecharacterPaySelLine.PayFormatTypeCodePayment format of the payment selection
tcPaySelCodecharacterPaySel.PaySelCodeCode
ttPaySelDatedatePaySel.PaySelDateExecution Date
tiPaySelLine_IDintegerPaySelLine.PaySelLine_IDRecord ID
tdPaySelLineAmountTCdecimalPaySelLine.PaySelLineAmountTCAmount
tdPaySelLineDiscountTCdecimalPaySelLine.PaySelLineDiscountTCDiscount
tlPaySelLineIsRefInFilelogicalPaySelLine.PaySelLineIsRefInFileRef in File
tcPaySelLineObjectTypecharacterPaySelLine.PaySelLineObjectTypeType
tdPaySelLineWHTAmtCCdecimalPaySelLine.PaySelLineWHTAmtCCSC WHT Amount
tdPaySelLineWHTAmtLCdecimalPaySelLine.PaySelLineWHTAmtLCBC WHT Amount
tdPaySelLineWHTAmtTCdecimalPaySelLine.PaySelLineWHTAmtTCTC WHT Amount
tcPaySelStatuscharacterPaySel.PaySelStatusStatus
tiPeriodPeriodintegerPeriod.PeriodPeriodGL Period
tiPeriodYearintegerPeriod.PeriodYearGL Calendar Year
tiState_IDintegerState.State_IDRecord ID
tcStateCodecharacterState.StateCodeState
tcStateDescriptioncharacterState.StateDescriptionDescription
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(CCollection),rowid(CDocument),rowid(CDocumentInvoiceXref),rowid(CInvoice),rowid(Creditor),rowid(BusinessRelation),rowid(Address),rowid(Country),rowid(State),rowid(Currency),rowid(Journal),rowid(Period),rowid(PaySelLine),rowid(BankNumber1),rowid(PaySel),rowid(GL),rowid(BankNumber2)


Internal usage


QadFinancials
method BPaymentSelectionReport.Remittance