project QadFinancials > class BPaymentSelectionReport > business logic query BasePayListPrepay


Parameters


iiCompanyIdintegerCompany id
iiAddressType_IDinteger
icCreditorCodescharacter
itFromExecDatedate
itTillExecDatedate
icFromPaySelcharacter
icToPaySelcharacter
icStauscharacter
icPaySelcharacter
itExecDatedate
iiCountryIDinteger
icBusinessRelationNamecharacter
icFromBusinessRelationNamecharacter
icToBusinessRelationNamecharacter


query condition


  each PaySel where
PaySel.Company_Id = iiCompanyId AND
PaySel.PaySelDate >= itFromExecDate AND
PaySel.PaySelDate <= itTillExecDate AND
PaySel.PaySelCode >= icFromPaySel AND
PaySel.PaySelCode <= icToPaySel AND
PaySel.PaySelStatus = icStaus AND
PaySel.PaySelDate = itExecDate AND
PaySel.PaySelCode = icPaySel

      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

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

          first PaySelPrepay (inner-join) where
PaySelPrepay.PaySelPrepay_ID = PaySelLine.PaySelLineParentObject_ID AND

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

                  first BusinessRelation (inner-join) where
BusinessRelation.BusinessRelation_ID = Creditor.BusinessRelation_ID AND
BusinessRelation.BusinessRelationName1 can-do icBusinessRelationName AND
BusinessRelation.BusinessRelationName1 >= icFromBusinessRelationName AND
BusinessRelation.BusinessRelationName1 <= icToBusinessRelationName

                      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

                      each VatNumber (outer-join) where
VatNumber.BusinessRelation_ID = BusinessRelation.BusinessRelation_ID AND
VatNumber.IdentityCountry_ID = iiCountryID

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


query resultset tqBasePayListPrepay


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_IDintegerBankNumber2.BankNumber_IDRecord ID
tcBankNumberExtensioncharacterBankNumber2.BankNumberExtensionBank Extension
tcBankNumberFormattedcharacterBankNumber2.BankNumberFormattedFormatted Bank Account No
tcBankNumberSwiftCodecharacterBankNumber2.BankNumberSwiftCodeSWIFT Code
tiBusinessRelation_IDintegerBusinessRelation.BusinessRelation_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.
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.
tiIdentityCountry_IDintegerVatNumber.IdentityCountry_IDCountry Tax Identification
tcPayFormatTypeCodecharacterBankPayFormat.PayFormatTypeCodePayment Format
tcPayFormatTypeCode2characterPaySelLine.PayFormatTypeCodePayment format of the payment selection
tiPaySel_IDintegerPaySel.PaySel_IDRecord ID
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
tdPaySelPrepayAmountToPayTCdecimalPaySelPrepay.PaySelPrepayAmountToPayTCAmount to Pay
tcPaySelPrepayReferenceTextcharacterPaySelPrepay.PaySelPrepayReferenceTextReference
tcPaySelStatuscharacterPaySel.PaySelStatusStatus
tcVatNumberIdentitycharacterVatNumber.VatNumberIdentityObsolete field
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(PaySel),rowid(BankPayFormat),rowid(BankNumber1),rowid(GL),rowid(PaySelLine),rowid(BankNumber2),rowid(PaySelPrepay),rowid(Creditor),rowid(BusinessRelation),rowid(Address),rowid(Country),rowid(VatNumber),rowid(Currency)


Internal usage


QadFinancials
method BPaymentSelectionReport.Paylist