Search Results get_default_cash_app_rule




Overview

OKL_AUTO_CASH_APPL_RULES_PVT is a private PL/SQL package in the Oracle E-Business Suite Applications (APPS) schema that supports the Oracle Lease and Finance Management (OKL) module. Its principal business function is to determine and apply automatic cash application rules for lease and finance contracts, enabling receipts to be matched to open receivables without manual intervention. The package governs the logic by which incoming cash receipts are allocated to specific invoices, contract streams, and receivable lines according to configured allocation rules.

The _PVT suffix indicates that this is a private package, meaning its members are not intended to be called directly by external code. Instead, it is invoked internally by public APIs and concurrent programs within the OKL product family. The package header declares global constants including G_APP_NAME, G_PKG_NAME, and standard error tokens such as OKL_UNEXPECTED_ERROR, reflecting its adherence to the OKL/OKC API error-handling framework. It also defines the global record type okl_rcpt_dtls_rec_type and the associated table type okl_rcpt_dtls_tbl_type, which are used to pass receipt detail collections internally.

Key Procedures and Functions

The package exposes seven documented procedures and functions:

  • GET_DEFAULT_CASH_APP_RULE — Retrieves the default cash application rule applicable to a given transaction or contract context. This is the object most commonly referenced in user searches.
  • AUTO_CASHAPP_FOR_ARINV — Performs automatic cash application against Oracle Receivables invoices.
  • GET_APPLICATIONS — Returns the set of receivable applications associated with a receipt or contract for evaluation.
  • AUTO_CASHAPP_FOR_CONTRACT — Executes automatic cash application logic at the contract level.
  • RECEIPT_MISMATCH — Identifies and handles mismatches between receipts and their expected applications.
  • AUTO_CASHAPP_FOR_CONSINV — Applies automatic cash application to consolidated invoices.
  • GET_ROUNDED_AMOUNT — Computes a rounded amount, typically to reconcile currency or application rounding differences during allocation.

Parameter lists are not published in the available metadata; callers should treat these as internal interfaces subject to change.

Tables Accessed

The package reads and writes across Receivables and Lease Management tables via APPS synonyms. Receivables tables include AR_CASH_RECEIPTS_ALL (receipt headers), AR_RECEIVABLE_APPLICATIONS_ALL (application of receipts to transactions), AR_PAYMENTS_INTERFACE_ALL (receipt import interface), RA_CUSTOMER_TRX_ALL and RA_CUSTOMER_TRX_LINES_ALL (invoice headers and lines), and HZ_CUST_ACCOUNTS (customer accounts). Lease-specific tables include OKL_CASH_ALLCTN_RLS and OKL_CASH_ALLCTN_RLS_ALL (cash allocation rules and their definitions), OKL_CSH_ALLCTN_RL_HDR (allocation rule headers), OKL_CNSLD_AR_HDRS_B (consolidated AR headers), OKL_STRM_TYP_ALLOCS (stream type allocations), and the contract structures OKC_K_HEADERS_ALL_B, OKC_K_HEADERS_B, OKC_RULES_B, and OKC_RULE_GROUPS_B.

Usage Notes

As a private package, OKL_AUTO_CASH_APPL_RULES_PVT is not invoked directly from standard application forms or reports. It is referenced by four other packages within the OKL module, which act as the public entry points for automatic cash application processing. It is typically exercised during receipt creation and import, contract billing, and consolidated invoice generation, where the system must resolve the default application rule and allocate cash accordingly. Customizations should call the public wrapper APIs rather than this private package, since its signature and behavior may change between releases. Developers inspecting auto-cash-application behavior in 12.1.1 or 12.2.2 should begin with GET_DEFAULT_CASH_APP_RULE to understand how default rules are resolved.