Search Results get_prorated_amount




Overview

The APPS.FV_AP_PREPAY_PKG package body supports Oracle E-Business Suite federal financials functionality surrounding prepayment invoice processing. In the Public Sector / Federal context, a prepayment represents an advance payment made against a purchase order before goods or services are received. This package enforces the business controls that prevent an organization from over-committing funds when a prepayment invoice is matched to a purchase order. Specifically, it validates that the prepayment invoice amount, together with any configured tolerance, does not exceed the remaining available amount on the referenced purchase order line location. When the test fails, the transaction is rejected, preserving budgetary integrity and preventing duplicate or excessive advance payments. The package also provides supporting logic to create prepayment invoice distributions and to compute prorated prepayment amounts across invoice lines. The header revision indicator shows source version 120.9, reflecting a long-lived component of the federal AP feature set.

Key Procedures and Functions

  • FUNDS_RESERVE — The entry point invoked during prepayment invoice processing. In the documented source excerpt its body is a placeholder (NULL), and the procedure carries an extensive signature including invoice identifier, unique packet identifier, set of books, base currency, invoice and purchasing encumbrance type identifiers, concurrent flag, system user, USSGL option, and IN OUT NOCOPY hold and count arrays used to return approval holds. Its intended role is to perform the funds reservation and hold-related checks associated with the prepayment.
  • TOLERANCE_CHECK — Evaluates whether a prepayment invoice may be matched to a purchase order by comparing the match amount plus the configured prepayment tolerance against the remaining amount on the purchase order line location. It reads the prepayment tolerance flag and tolerance value from the operating unit definition and returns a status indicator (default 'Y') that signals whether the tolerance test passes.
  • CREATE_PREPAY_LINES — Creates the prepayment invoice distribution lines required when an advance payment is recorded, ensuring the appropriate accounting and matching entries are generated.
  • GET_PRORATED_AMOUNT — Calculates the prorated portion of a prepayment amount, distributing the advance across the relevant invoice lines or quantities based on the applicable basis.

Tables Accessed

  • FV_OPERATING_UNITS — Read to obtain the prepayment_tolerance_flag and prepayment_tolerance values configured on the Define Federal Options form, which drive the tolerance validation logic.
  • AP_INVOICE_DISTRIBUTIONS — Accessed for invoice distribution amounts and to support creation of prepayment lines and proration calculations.
  • PO_LINE_LOCATIONS_ALL — Read to determine the remaining (unmatched) amount on the purchase order line location against which the prepayment is being applied.

Usage Notes

This package is classified as an OTHER API and is referenced by zero other packages, indicating it is invoked directly from Oracle's own prepayment processing flows rather than exposed as a general-purpose integration API. It is typically called during invoice matching when a prepayment invoice is associated with a purchase order, with TOLERANCE_CHECK acting as the enforcement gate and FUNDS_RESERVE handling reservation and hold outcomes. The IN OUT NOCOPY hold and count arrays align it with the AP_APPROVAL_PKG approval engine, so it participates in the standard invoice approval chain. Because the documented FUNDS_RESERVE body is a stub in the source excerpt, custom extensions or later patches may supply the operational logic. Consultants extending or debugging prepayment behavior should treat these signatures as internal, verify the active version installed in the target instance, and confirm tolerance settings in the operating unit options before relying on the package's validation results.