project QadFinancials > class BMfgPO > business logic query PurchaseOrderForSelect

Description

Query that returns all po information for the open PurchaseOrders (where po_stat = ""), and where the other parameters match - when values are provided


Parameters


icDomainCodecharacterDomainCode
icPurchaseOrdercharacterPurchase Order
icCreditorCodecharacterCreditor Code
icCurrencyCodecharacterCurrencyCode
itOrderDatedateOrder Date
iiCompanyIdintegerCompany id
icBusinessRelationName1character


query condition


  each po_mstr where
po_mstr.po_domain = icDomainCode AND
po_mstr.po_stat = '' AND
po_mstr.po_nbr matches icPurchaseOrder AND
po_mstr.po_vend matches icCreditorCode AND
po_mstr.po_curr matches icCurrencyCode AND
po_mstr.po_ord_date = itOrderDate

      first Creditor (inner-join) where
Creditor.SharedSet_Id = vi_CREDITOR_sharedset(iiCompanyId) AND
Creditor.CreditorCode = po_mstr.po_vend AND

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

          first SharedSet (inner-join) where
SharedSet.SharedSet_ID = Creditor.SharedSet_ID AND

              each DomainSharedSet (inner-join) where
DomainSharedSet.SharedSet_ID = SharedSet.SharedSet_ID AND

                  first Domains (inner-join) where
Domains.Domain_ID = DomainSharedSet.Domain_ID AND
Domains.DomainCode = icDomainCode


query resultset tqPurchaseOrderForSelect


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.
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.
tcCreditorCodecharacterCreditor.CreditorCodeSupplier Code
tiDomain_IDintegerDomainSharedSet.Domain_IDDomain
tcDomainCodecharacterDomains.DomainCodeDomain
tiSharedSet_IDintegerSharedSet.SharedSet_IDRecord ID
tcpo_nbrcharacterpo_mstr.po_nbrPurchase Order
ttpo_ord_datedatepo_mstr.po_ord_dateOrder Date
tcpo_vendcharacterpo_mstr.po_vendSupplier
tcpo_currcharacterpo_mstr.po_currCurrency
tcpo_cr_termscharacterpo_mstr.po_cr_termsCredit Terms
tcpo_sitecharacterpo_mstr.po_siteSite
tcpo_shipcharacterpo_mstr.po_shipShip-To
tcpo_domaincharacterpo_mstr.po_domainDomain
tcpo_statcharacterpo_mstr.po_statStatus


Internal usage


QadFinancials
method BMfgPO.ApiPOAndPendingVoucher