project QadFinancials > class BPaymentSelection > business logic query PaySelLineByPaySelIdPrepayment

Description

This query is created to improve the performance on the Payment Selection load (GetPublicTables). To get more information, check BTS 3934.


Parameters


icObjectTypeListcharacterA comma seperated list of object types.
iiPaySelIdintegerThe payment selection ID
iiCompanyIdintegerCompany id


query condition


  each PaySelLine where
PaySelLine.PaySel_ID = iiPaySelId AND
PaySelLine.PaySelLineObjectType = icObjectTypeList AND
PaySelLine.PaySelLineParentObject_ID > 0

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

          first BusinessRelation (conditional-join) where
BusinessRelation.BusinessRelation_ID = PaySelPrepay.BusinessRelation_ID AND

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

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


query resultset tqPaySelLineByPaySelIdPrepayment


field namedata typedb fielddescription
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.
tcCreditorCodecharacterCreditor.CreditorCodeSupplier Code
tcCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
tiPaySel_IDintegerPaySelLine.PaySel_IDLink to PaySel
tiPaySelLine_IDintegerPaySelLine.PaySelLine_IDRecord ID
tcPaySelLineObjectTypecharacterPaySelLine.PaySelLineObjectTypeType
tiPaySelLineParentObject_IDintegerPaySelLine.PaySelLineParentObject_IDParent Object
tiPaySelPrepay_IDintegerPaySelPrepay.PaySelPrepay_IDRecord ID
tdPaySelPrepayAmountToPayTCdecimalPaySelPrepay.PaySelPrepayAmountToPayTCAmount to Pay
tcPaySelPrepayReferenceTextcharacterPaySelPrepay.PaySelPrepayReferenceTextReference


Internal usage


QadFinancials
method BPaymentSelection.CalculatePaySelLine