Search Results cust_amount_info




Overview

The APPS.OKL_CSBRW_PVT package body is a private (PVT-classified) Oracle E-Business Suite API belonging to the Lease Management (OKL) module. Its documented purpose is to supply aggregated customer-level financial information, specifically the total amount applied against a customer's receipts and the total outstanding receivable balance due from that customer. The single documented entry point, CUST_AMOUNT_INFO, is designed for internal consumption by other ETRM/Lease Management components rather than direct end-user invocation. The package header carries the version marker OKLRFBRB.pls 120.2, dated 30-Oct-2005, indicating it has been stable across the 12.1.1 and 12.2.2 release lines.

Key Procedures and Functions

The package exposes one documented function:

  • CUST_AMOUNT_INFO — Returns a status code (VARCHAR2) and, through OUT parameters, supplies the applied amount and outstanding amount for a given customer account. It accepts an API version, an initialization flag, the customer account identifier, and returns message count and message data for error propagation. Internally it opens two explicit cursors: one summing applied amounts from receivable applications and cash receipts, and one summing remaining due amounts from payment schedules joined to transactions. Both cursors apply NVL(...,0) to guarantee a numeric result when no rows qualify, a correction introduced for bug 3527642. The function is wrapped in the standard OKC_API.START_ACTIVITY / OKC_API.END_ACTIVITY error-handling framework, raising the appropriate OKC exception when the return status signals an error or unexpected error.

Tables Accessed

The package reads from four Receivables tables via APPS synonyms:

  • AR_CASH_RECEIPTS_ALL — Filtered on pay_from_customer matching the input customer account and on status in APP or UNAPP; supplies the cash receipt linkage for applied amounts.
  • AR_RECEIVABLE_APPLICATIONS_ALL — Joined to cash receipts by cash_receipt_id, restricted to status ACC or UNAPP, and summed on amount_applied.
  • AR_PAYMENT_SCHEDULES_ALL — Restricted to class = 'INV' and status = 'OP' (open invoices); summed on amount_due_remaining to derive the outstanding balance.
  • RA_CUSTOMER_TRX_ALL — Joined by customer_trx_id and filtered on bill_to_customer_id matching the input customer account.

All access is read-only; the package performs no inserts, updates, or deletes.

Usage Notes

Because the package is classified as private and the referenced-by count is zero, it is not exposed as a public integration API. It is intended to be called from within Lease Management flows—such as contract or billing inquiries—where a consolidated view of a customer's applied and outstanding receivable amounts is required. Typical invocation occurs from OKL PL/SQL code that already holds the OKC_API initialization context; because CUST_AMOUNT_INFO enforces the OKC activity framework, callers should pass a valid p_api_version and honor the returned status and message outputs. Given its private classification, customizations should avoid direct dependency where possible and instead call through supported public APIs; where direct use is unavoidable, the function's reliance on AR open-item and application statuses should be noted, since changes to those statuses affect results.