project QadFinancials > class BPaymentSelectionReport > business logic query BaseRemittanceByPaySelCreditor


Parameters


iiCompanyIdintegerCompany id
iiAddressType_IDinteger
icCreditorCodescharacter
icFromPaySelcharacter
icToPaySelcharacter
icPaySelcharacter
ilIsRefInFilelogical
itFromPaySelDatedate
itToPaySelDatedate
ilSendRemittancelogical


query condition


  each PaySel where
PaySel.Company_Id = iiCompanyId AND
PaySel.PaySelCode >= icFromPaySel AND
PaySel.PaySelCode <= icToPaySel AND
PaySel.PaySelCode = icPaySel AND
PaySel.PaySelDate >= itFromPaySelDate AND
PaySel.PaySelDate <= itToPaySelDate

      first BankPayFormat (inner-join) where
BankPayFormat.BankPayFormat_ID = PaySel.BankPayFormat_ID AND

          first BankNumber1 (inner-join) where
BankNumber1.BankNumber_ID = BankPayFormat.BankNumber_ID AND

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

      each PaySelLine (inner-join) where
PaySelLine.PaySel_ID = PaySel.PaySel_ID AND
PaySelLine.PaySelLineIsRefInFile = ilIsRefInFile

          first BankNumber2 (conditional-join) where
BankNumber2.BankNumber_ID = PaySelLine.BankNumber_ID AND

          each CDocumentInvoiceXref (inner-join) where
CDocumentInvoiceXref.PaySelLine_ID = PaySelLine.PaySelLine_ID AND

              first CDocument (inner-join) where
CDocument.Company_Id = iiCompanyId AND
CDocument.CDocument_ID = CDocumentInvoiceXref.CDocument_ID AND

                  first CCollection (outer-join) where
CCollection.Company_Id = iiCompanyId AND
CCollection.CCollection_ID = CDocument.CCollection_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 <> ?


query resultset tqBaseRemittanceByPaySelCreditor


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.
tcBankNumbercharacterBankNumber2.BankNumberBank Number
tiBankNumber_IDintegerBankPayFormat.BankNumber_IDBank Number
tcBankNumberExtensioncharacterBankNumber2.BankNumberExtensionBank Extension
tcBankNumberFormattedcharacterBankNumber2.BankNumberFormattedFormatted Bank Account No
tcBankNumberSwiftCodecharacterBankNumber2.BankNumberSwiftCodeSWIFT Code
tiBankPayFormat_IDintegerBankPayFormat.BankPayFormat_IDRecord ID
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
tdCDocumentBankChargeAmountCCdecimalCDocument.CDocumentBankChargeAmountCCSC Bank Charge Amt
tdCDocumentBankChargeAmountLCdecimalCDocument.CDocumentBankChargeAmountLCBC Bank Charge Amt
tdCDocumentBankChargeAmountTCdecimalCDocument.CDocumentBankChargeAmountTCTC Bank Charge Amt
tdCDocumentBankChargeTaxAmountCCdecimalCDocument.CDocumentBankChargeTaxAmountCCSC Bank Charge Tax
tdCDocumentBankChargeTaxAmountLCdecimalCDocument.CDocumentBankChargeTaxAmountLCBC Bank Charge Tax
tdCDocumentBankChargeTaxAmountTCdecimalCDocument.CDocumentBankChargeTaxAmountTCTC Bank Charge Tax
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)
tiCompany_IDintegerPaySel.Company_IDLink to Company
tcCompanyBankNumbercharacterBankNumber1.BankNumberBank Number
tcCompanyBankNumberExtensioncharacterBankNumber1.BankNumberExtensionBank Extension
tcCompanyBankNumberFormattedcharacterBankNumber1.BankNumberFormattedFormatted Bank Account No
tcCompanyBankNumberSwiftCodecharacterBankNumber1.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(PaySel),rowid(BankPayFormat),rowid(BankNumber1),rowid(GL),rowid(PaySelLine),rowid(BankNumber2),rowid(CDocumentInvoiceXref),rowid(CDocument),rowid(CCollection),rowid(CInvoice),rowid(Creditor),rowid(BusinessRelation),rowid(Address),rowid(Country),rowid(State),rowid(Currency),rowid(Journal),rowid(Period)


Internal usage


QadFinancials
method BPaymentSelectionReport.Remittance