Search Results get_com_balance




Overview

APPS.AR_INVOICE_SQL_FUNC_PUB is a public PL/SQL package body in Oracle E-Business Suite Receivables (AR). It provides a consolidated library of SQL-based helper functions that surface transactional, tax, commitment, and remit-to information from the Receivables data model to other EBS components. The package is classified as a public (PUB) API in the ETRM metadata for 12.2.2, with the package header carrying an original header revision dated 2005, indicating this is a long-standing, stable utility object equally present in 12.1.1 and 12.2.2.

The package name reflects its principal design intent: it supplies function-based SQL lookups that are generic enough to be reused across many dependents, which is corroborated by the metadata note that it is "referenced by 8 other packages." Its functions underpin view definitions—the header comments explicitly state that GET_DESCRIPTION is "called by lines view"—and thus play a role in presenting translated and computed attributes to Oracle Forms and concurrent programs.

Key Procedures and Functions

The metadata documents ten program units whose names indicate distinct responsibilities:

  • GET_DESCRIPTION — Returns the multilingual translated description for a transaction line; documented as a dummy/cover function that returns null on single-language installs and as being invoked by the lines view.
  • GET_INV_TAX_CODE_NAME — Resolves the invoice tax code name for a given bill-to context, using the bill-to site use, customer, and tax printing options.
  • GET_COM_TOTAL_ACTIVITY — Provides the total activity amount for a commitment, matching the "total_activity" search term. It supplies the aggregate commitment activity used in commitment reporting.
  • GET_COM_AMT_UNINVOICED — Returns the uninvoiced commitment amount.
  • GET_COM_BALANCE — Returns the remaining commitment balance.
  • GET_COMMIT_THIS_INVOICE — Determines the commitment amount attributable to the current invoice.
  • UPDATE_CUSTOMER_TRX — Performs update logic against customer transactions; the only clearly write-oriented unit in the set.
  • GET_TAXYN — Returns a tax indicator (Y/N) derived from transaction or tax configuration data.
  • GET_REMIT_TO_GIVEN_BILL_TO — Derives the appropriate remit-to address for a given bill-to customer or site.
  • GET_REMIT_ADDRESS_ID — Returns the remit-to address identifier used in invoice and remittance processing.

Tables Accessed

The package reads and writes the core Receivables and Trading Community tables:

Usage Notes

The package is invoked primarily from view definitions, Oracle Forms, and other PL/SQL packages rather than directly by end users. Because the functions return single scalar values keyed by identifiers such as customer_trx_line_id or bill-to site use, they are well suited to SELECT-list consumption in views and in post-query triggers. The commitment functions (GET_COM_TOTAL_ACTIVITY, GET_COM_AMT_UNINVOICED, GET_COM_BALANCE, GET_COMMIT_THIS_INVOICE) support commitment reporting requirements where activity and remaining balance must be presented alongside the invoice. Custom code may call the public functions safely, but should treat UPDATE_CUSTOMER_TRX with caution, observing standard Receivables API and validation conventions. Given the 2005 header revision, this package is stable and unchanged across the 12.1.1 and 12.2.2 releases.