Search Results get_recoverable_tax




Overview

PO_TAX_SUMMARY_PKG is a PL/SQL package owned by the APPS schema in Oracle E-Business Suite Purchasing. It is declared AUTHID CURRENT_USER, meaning its SQL statements execute with the privileges of the invoking user rather than the package owner. The package provides summarized tax figures for purchasing documents at the header, line, and shipment levels. Its central purpose is to separate recoverable tax from nonrecoverable tax and to return aggregate tax amounts for a given purchasing document, so that downstream processes — most notably Oracle Payables invoice matching, purchasing reporting, and tax reconciliation — can obtain consistent tax totals without re-deriving them from distribution lines. The package is classified as OTHER in the ETRM metadata, indicating it is an internal utility rather than a published open interface or public API.

Key Procedures and Functions

The package exposes four documented functions, all returning a NUMBER value:

  • GET_RECOVERABLE_TAX — Returns the total recoverable tax for a purchasing document context identified by header, line, and shipment identifiers together with an object type and object location. This is the function associated with the search term "get_recoverable_tax" and is the primary entry point for retrieving tax that can be reclaimed.
  • GET_NONRECOVERABLE_TAX — Returns the corresponding nonrecoverable tax total for the same document context. Used together with GET_RECOVERABLE_TAX to present the full tax position.
  • GET_HEADER_AMOUNT — Returns a header-level amount for a given header, object type, and currency code. The currency code argument was added under Bug#2767208, enabling the function to resolve amounts correctly when the document currency differs from the functional currency.
  • GET_LINE_AMOUNT — Returns a line-level amount based on a line identifier and currency code. The metadata references Bug#3426902 in connection with this function.

Commented-out pragma restrict_references directives appear for the three original functions, indicating the package was at one time evaluated for purity-level restrictions. These pragmas are inactive in the shipped source.

Tables Accessed

The package reads from the following tables through APPS synonyms:

  • PO_DISTRIBUTIONS — The principal source of tax distribution amounts, since recoverable and nonrecoverable tax is recorded at the distribution level.
  • PO_LINES and PO_LINE_LOCATIONS — Supply the line and shipment context needed to scope tax amounts to a specific line or shipment identifier.
  • PO_REQUISITION_LINES and PO_REQ_DISTRIBUTIONS — Allow the same tax summarization logic to apply to requisition-sourced documents.
  • FND_CURRENCIES — Supports currency validation and conversion context for the amount-returning functions.

Usage Notes

PO_TAX_SUMMARY_PKG is invoked internally by Purchasing forms, by concurrent programs that report or reconcile tax, and by custom code that needs recoverable and nonrecoverable tax totals for a purchasing document. Because the functions accept header, line, and shipment identifiers plus an object type and object location, callers must supply the identifiers appropriate to the level being queried. The package is referenced by no other documented packages in the ETRM metadata, so direct calls from custom extensions should follow the documented signatures and treat the functions as read-only summarization utilities. The current header revision shown in the source is 115.4, dated 2004, reflecting the underlying tax-summary logic carried forward into EBS 12.1.1 and 12.2.2.