Search Results get_tld_amount_applied
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:
- Invoice and line amount inquiries: INVOICE_LINE_AMOUNT_ORIG, INVOICE_LINE_AMOUNT_APPLIED, INVOICE_LINE_AMOUNT_CREDITED, INVOICE_LINE_AMOUNT_REMAINING, INVOICE_AMOUNT_ORIG, INVOICE_AMOUNT_APPLIED, INVOICE_AMOUNT_CREDITED, and INVOICE_AMOUNT_REMAINING return the original, applied, credited, and remaining monetary values at the line and header levels. INVOICE_LINE_TAX_AMOUNT returns the tax component for an invoice line.
- Transaction line detail (TLD) aggregates: GET_TLD_AMOUNT_ORIG, GET_TLD_AMOUNT_APPLIED, GET_TLD_AMOUNT_CREDITED, GET_TLD_AMOUNT_REMAINING, and GET_TLD_BALANCE retrieve amounts and balances tied to transaction line detail records.
- Contract and invoice balance: GET_CONTRACT_INVOICE_BALANCE returns the outstanding balance for a contract's invoice; INVOICE_AMOUNT_FOR_STREAM returns the invoiced amount for a given billing stream.
- Line identification: LINE_ID_APPLIED and LINE_NUMBER_APPLIED resolve the line identifier or line number against which an application was made.
- Other utilities: LAST_INVOICE_DATE returns the most recent invoice date, and CHECK_PREUPGRADE_DATA performs pre-upgrade validation of billing data.
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.
-
PACKAGE: APPS.OKL_BILLING_UTIL_PVT
12.1.1
-
PACKAGE: APPS.OKL_BILLING_UTIL_PVT
12.2.2
-
PACKAGE BODY: APPS.OKL_BILLING_UTIL_PVT
12.1.1
-
PACKAGE BODY: APPS.OKL_BILLING_UTIL_PVT
12.2.2
-
APPS.OKL_BILLING_UTIL_PVT dependencies on RA_CUSTOMER_TRX_LINES_ALL
12.1.1
-
APPS.OKL_BILLING_UTIL_PVT dependencies on RA_CUSTOMER_TRX_LINES_ALL
12.2.2