Search Results get_line_prepay_balance




Overview

APPS.AP_WEB_PAYMENTS_PKG is a server-side PL/SQL package within the Oracle E-Business Suite Payables module that supports the Oracle Payables Internet Expenses (OIE) and Payables web-based payment inquiry flows. Its principal business function is to expose summarized and derived payment information about invoices to the web user interface and to any calling program that requires a consolidated view of disbursement activity, without forcing the caller to query the underlying Payables base tables directly. The package aggregates data from payment, invoice, invoice line, invoice distribution, and expense report header records, returning payment history, payment identifiers, payment dates, and prepayment balances through a small and stable public interface.

The package header carries a version marker of 120.4 and retains restrictive pragmas on at least one function, indicating that the interface has been stable across the 12.1.1 and 12.2.2 releases. It is classified as an OTHER API rather than a formal open interface, which means it is intended primarily for internal consumption by Oracle application code and for controlled extension by customers and integrators.

Key Procedures and Functions

The package exposes seven documented functions:

  • get_paid_by_list — Returns the list of parties or payment sources associated with the payments made against a given invoice, driven by the invoice identifier and payment number.
  • get_total_payments_made — Returns the cumulative amount paid against an invoice, providing a single aggregated figure for payment inquiry and reconciliation screens.
  • get_checkid — Returns the payment identifier (check identifier) associated with an invoice, allowing the caller to resolve the originating disbursement document.
  • get_last_payment_date — Returns the date of the most recent payment applied to an invoice.
  • get_prepay_amount_remaining — Returns the amount of prepayment still available to be applied against an invoice. This is the function most frequently searched by developers working with prepayment application logic.
  • get_prepay_balance — Returns the prepayment balance associated with an invoice, employee, and currency combination.
  • get_line_prepay_balance — Returns the prepayment balance at the individual invoice line level, scoped by invoice identifier and line identifier.

Tables Accessed

The package reads from six Payables tables, accessed through APPS synonyms: AP_CHECKS, which holds the payment document and check details; AP_INVOICES, the invoice header; AP_INVOICE_PAYMENTS, the invoice-to-payment association; AP_INVOICE_LINES, used for line-level prepayment balance resolution; AP_INVOICE_DISTRIBUTIONS, which carries the accounting distributions against which prepayment amounts are tracked; and AP_EXPENSE_REPORT_HEADERS, which supports the expense report context in which web payments are frequently queried. The package is predominantly read-only, deriving values rather than persisting changes.

Usage Notes

AP_WEB_PAYMENTS_PKG is invoked from Oracle Payables web pages, from the Internet Expenses application, and from custom extensions that need payment and prepayment information surfaced in a consistent form. Because the package is referenced by one other package and exposes only functions, it is typically called from PL/SQL blocks, forms-based personalizations, and concurrent or report programs rather than from standalone user actions. Developers should note that the get_prepay_amount_remaining function is the standard entry point for determining how much prepayment remains unapplied to a specific invoice, and that the optional header, responsibility, and application parameters allow the function to be invoked in either a secure or an unconstrained context. Callers should treat the package as a supported but internal interface, and validate behavior after upgrades between 12.1.1 and 12.2.2 since the underlying application schema changes can alter returned balances.