Search Results format_proj_curr_code




Overview

PA_INVOICE_CURRENCY is an Oracle E-Business Suite PL/SQL package owned by the APPS schema that supports Project Billing invoice generation and currency recalculation. Its central responsibility is to populate the invoice currency code and currency conversion attributes on the PA_DRAFT_INVOICES and PA_DRAFT_INVOICES_ALL records, and to derive the invoice amount (INV_AMOUNT) on the associated PA_DRAFT_INVOICE_ITEMS rows. The package is declared with AUTHID CURRENT_USER, meaning that its unqualified database references resolve against the privileges of the invoking user rather than the APPS schema itself.

The package header originates from source file PAXICURS.pls and carries the identifier $Header: PAXICURS.pls 120.1 2005/08/19 17:14:09 mwasowic noship $. It exposes a global variable, g_currency_code VARCHAR2(15), together with seven documented program units. Its API classification within ETRM is OTHER, indicating that it is an internal supporting package rather than a formal public API.

Key Procedures and Functions

The documented program units of the package are the following:

  • FORMAT_PROJ_CURR_CODE — a function that returns a VARCHAR2 value and carries a pragma RESTRICT_REFERENCES (..., WNDS) declaration. The comment block in the source identifies it as the routine used to format the currency for Multi Radix changes, with the global currency code fetched from the calling invoice program (paisql.lpc). This is the specific object associated with the search term "format_proj_curr_code".
  • RECALCULATE — the principal procedure that repopulates the invoice currency code, conversion attributes, and item-level invoice amounts. Per the header comment, it accepts the project identifier, draft invoice number, calling module, customer identifier, invoice currency code, rate type, rate date, exchange rate, user identifier, and bill-thru date, and returns an output status (X_Status), where NULL signifies success and a populated value signifies an application error code.
  • GET_INV_CURR_INFO — a procedure that fetches the invoice currency and currency attributes for an input invoice based on the supplied project identifier.
  • GET_PROJFUNC_INV_CURR_INFO — a retrieval routine that obtains invoice currency and currency attribute information in the project function context.
  • GET_PROJ_CURR_INFO — a retrieval routine that returns project-level currency information.
  • UPDATE_CRMEMO_INVAMT — a procedure that updates invoice amounts for credit memo processing.
  • RECALCULATE_DRIVER — the driving procedure that orchestrates recalculation logic across the relevant invoice records.

Tables Accessed

Via APPS synonyms, the package references the following tables: PA_DRAFT_INVOICES and PA_DRAFT_INVOICES_ALL (the draft invoice headers whose currency code and conversion attributes are populated); PA_DRAFT_INVOICE_ITEMS (the invoice lines whose INV_AMOUNT is derived); PA_PROJECTS_ALL and PA_PROJECT_CUSTOMERS (project and customer context used to resolve billing and currency information); PA_AGREEMENTS_ALL (agreement-level billing and currency terms); PA_SUMMARY_PROJECT_FUNDINGS (funding summarization data relevant to the amount calculations); and PA_DISTRIBUTION_WARNINGS, which the recalculation logic uses to record warnings encountered during distribution processing.

Usage Notes

Per the package documentation, the procedure does not lock any table explicitly; locking responsibility belongs to the calling program. For the PAXINRVW flow the calling program must lock PA_DRAFT_INVOICES for the affected invoices, while for the PAIGEN flow it must lock PA_PROJECTS. The X_Status output parameter is designed for consumption by PAXINRVW, with NULL indicating a successful invocation and a non-NULL value carrying an application error code.

Typical invocation paths are the Project Billing invoice review and generation forms and the associated concurrent programs, whose calls originate from the invoice logic module paisql.lpc. Custom code that invokes this package should supply the calling module value expected by the standard callers, honor the documented locking contract, and treat the returned status string as the error indicator rather than relying on exceptions.