Search Results get_default_payitem_info




Overview

PO_COMPLEX_WORK_PVT is an Oracle Purchasing private API (classified as PVT in ETRM 12.2.2) owned by the APPS schema and defined with AUTHID CURRENT_USER. Its purpose is to encapsulate the business rules that govern complex work purchasing — the Oracle EBS framework that supports milestone, rate, lump sum, advance, and delivery payment styles on a purchase order. The package determines whether a given document style or purchase order qualifies as complex work, whether it is financing-based, and it resolves the default payment item information that the Purchasing forms need when a complex work line is created or maintained. Because the package is a private API, it is not intended for direct customer invocation; Oracle's own forms, dependencies, and dependent packages call it internally. ETRM records it as referenced by 25 other packages, confirming its role as a shared low-level utility within the Purchasing application family, and the source header ($Header: PO_COMPLEX_WORK_PVT.pls 120.2 2010/06/24) shows the file was last revised in the 12.1.x RUP stream that predates 12.2.2.

Key Procedures and Functions

ETRM documents ten entry points. GET_PAYMENT_STYLE_SETTINGS accepts a payment style identifier and returns a set of flag outputs describing the capabilities of that style: whether it is complex work, whether it permits financing payments, whether retainage is allowed, and whether advance, milestone, lump sum, and rate payment types are permitted. This procedure is the central configuration lookup for style-driven behavior in the complex work UI.

The boolean predicates form the decision layer. IS_COMPLEX_WORK_STYLE and IS_FINANCING_PAYMENT_STYLE evaluate a style identifier from PO_DOC_STYLE_HEADERS. IS_COMPLEX_WORK_PO and IS_FINANCING_PO evaluate an actual purchase order, each offered in two overloads: one taking only a PO header identifier, and one additionally taking a draft identifier so the same test can be applied to draft (unapproved) documents. The financing predicate, IS_FINANCING_PO, is the function that answers the user's search term "is_financing_po": it tells callers whether the order uses a financing payment style such as advance or prepayment. GET_DEFAULT_PAYITEM_INFO derives default payment type, quantity, amount, and price for a line, using line value basis, matching basis, quantity, amount, and price as inputs; GET_ADVANCE_AMOUNT completes the documented set.

Tables Accessed

The package reads PO_DOC_STYLE_HEADERS to resolve document style definitions and the complex work and financing flags attached to a style. PO_HEADERS and PO_HEADERS_ALL provide the header records tested by the PO-level predicates and supply the defaulting logic with header context. PO_LINE_LOCATIONS_ALL and PO_LINE_LOCATIONS_ARCHIVE_ALL are used to resolve shipment and payment line locations, including archived locations on older or closed documents. PLITBLM is referenced in connection with payment item processing. All access is through APPS synonyms.

Usage Notes

PO_COMPLEX_WORK_PVT is invoked from the Purchasing forms during entry of complex work orders — for example, when the Payment tab or the payment style list of values must be validated or populated — and from concurrent programs and dependent PL/SQL packages that must branch on whether an order is complex or financing-based. Customizations should not call the package directly, since it is a private API subject to change without notice; extensions should instead use the supported public APIs, or replicate the equivalent style lookup through PO_DOC_STYLE_HEADERS if only a read is required. The dual overloads support pre-approval draft validation, so integrators inspecting drafts must select the overload that accepts p_draft_id to obtain correct results.