Search Results invoice_line_amount_orig




Overview

OKL_BILLING_UTIL_PVT is a private (PVT) PL/SQL utility package within the Oracle E-Business Suite Contracts (OKL) module, specifically serving the Oracle Lease and Finance Management (OLFM) and related contract billing functionality. Its primary business purpose is to provide a centralized repository of billing calculation and inquiry routines that derive, aggregate, and reconcile invoice amounts associated with lease and finance contracts. The package exposes functions that compute original, applied, credited, and remaining balances at both the invoice header level and the invoice line level, drawing from Oracle Receivables and Oracle Contracts tables. Because it is classified as a PVT API, it is not intended for direct external calls; it functions as an internal engine consumed by other OKL packages and public APIs. The metadata records 35 documented procedures and functions, and the package is referenced by 29 other packages, confirming its role as a foundational billing utility layer. The package also maintains standard OKL_API error-handling constants such as G_RET_STS_SUCCESS, G_RET_STS_ERROR, G_RET_STS_UNEXP_ERROR, and the G_EXCEPTION_ERROR and G_EXCEPTION_UNEXPECTED_ERROR exceptions, along with message tokens like G_UNEXPECTED_ERROR, G_SQLERRM_TOKEN, and G_SQLCODE_TOKEN. A G_UI_DATE_MASK global is initialized from the profile option ICX_DATE_FORMAT_MASK, indicating the package participates in date-format handling consistent with the EBS user interface layer.

Key Procedures and Functions

The documented routines group into several functional families:

Tables Accessed

The package reads and processes data from Receivables and Contracts tables via APPS synonyms. AR_PAYMENT_SCHEDULES_ALL, AR_RECEIVABLE_APPLICATIONS_ALL, AR_ADJUSTMENTS_ALL, and AR_DISTRIBUTIONS_ALL supply the applied, credited, and adjusted amounts that drive the amount and balance computations. OKL_CNSLD_AR_HDRS_B, OKL_CNSLD_AR_LINES_B, and OKL_CNSLD_AR_STRMS_B store consolidated invoice header, line, and stream data for lease billing. OKL_TRX_AR_INVOICES_B and OKL_TXD_AR_LN_DTLS_B hold transaction-level invoice and line details, while OKL_EXT_SELL_INVS_B holds external sell invoices. OKC_K_HEADERS_B, OKL_K_HEADERS, OKC_GOVERNANCES, and OKL_STRM_TYPE_B provide the contract header, governance, and billing stream context. FND_LOG_MESSAGES supports debug and error logging.

Usage Notes

As a PVT package, OKL_BILLING_UTIL_PVT is invoked internally by other OKL packages, forms, and concurrent programs rather than being called directly from custom code. It is typically reached during billing inquiry screens, invoice generation, credit and adjustment processing, and balance reporting within OLFM, where callers request computed invoice or line amounts. It may also be referenced indirectly by concurrent programs that reconcile lease billing against Receivables. Customizations should avoid direct dependency on this package because private APIs carry no upgrade guarantee; developers requiring similar amounts should use the corresponding public OKL APIs. The CHECK_PREUPGRADE_DATA routine indicates the package participates in upgrade validation, and its AR and OKL table access means it must be run within the standard EBS security context.