Search Results jg_ext_withholding_prepay




Overview

APPS.JG_EXTENDED_WITHHOLDING_PKG is the regional extended withholding tax engine shipped in Oracle E-Business Suite 12.1.1 and 12.2.2 as part of the JG (Latin America / global tax) product family. Its business purpose is to route withholding tax calculations to the correct country-specific routine at the moment an invoice, invoice payment, or prepayment application is processed in Payables. The package body (last shipped as jgexawtb.pls version 120.15) acts as a dispatch layer: it resolves the operating unit from the FND profile option ORG_ID, derives the country code through JG_ZZ_SHARED_PKG.GET_COUNTRY, and then conditionally invokes the appropriate localized withholding routine. In the documentation excerpt this is illustrated for Argentina, where the call is delegated to JL_AR_AP_WITHHOLDING_PKG.JL_AR_AP_DO_WITHHOLDING with the invoice identifier, withholding date, calling module, amount and payment context passed through. The same package supplies the reversal paths and the distribution-linking logic required to keep withholding tax balances consistent with invoice and payment accounting.

Key Procedures and Functions

  • JG_DO_EXTENDED_WITHHOLDING — the primary public entry point. It determines the operating unit and country, then calls the regional withholding calculation routine for that country. It accepts the invoice, withholding date, calling module, amount and payment/check context, and returns a status indicator.
  • JG_UNDO_EXTENDED_WITHHOLDING — reverses a previously calculated extended withholding so that cancelled or adjusted transactions do not leave residual withholding tax entries.
  • JG_UNDO_TEMP_EXT_WITHHOLDING — removes temporary withholding records created during calculation, typically when a transaction is rolled back before final posting.
  • JG_EXT_WITHHOLDING_DEFAULT — resolves default withholding attributes (rates, bases or grouping) for the transaction in process.
  • JG_EXTENDED_MATCH — matches withholding distributions against the corresponding invoice or payment distributions.
  • JG_EXTENDED_INSERT_DIST — inserts the withholding tax distribution lines generated by the calculation into the distribution table.
  • JG_EXT_WITHHOLDING_PREPAY — the prepayment-specific path, applying extended withholding rules when a prepayment is created or applied to an invoice. This is the routine most directly associated with the search term "jg_ext_withholding_prepay".

Tables Accessed

  • AP_INVOICE_DISTRIBUTIONS_ALL — read to derive the invoice distribution basis, and written by the distribution insertion logic so that withholding lines are visible alongside the invoice lines they relate to.
  • AP_SELECTED_INVOICES_ALL — read to obtain the invoices selected for payment, providing the withholding base for the payment and prepayment routines.

Usage Notes

The package is invoked in two principal ways. Internally, the Payables invoice and payment workflows call JG_DO_EXTENDED_WITHHOLDING during withholding tax calculation, and the prepayment routines call JG_EXT_WITHHOLDING_PREPAY when prepayments are applied. In custom extensions, developers reference the package directly from PL/SQL when they need to reproduce standard extended withholding behavior outside a standard form. The package is referenced by two other APPS packages, and customization should be limited to wrapper calls rather than modification of the shipped body, since the logic is patched by Oracle and any local changes would be overwritten on upgrade. Note that the country dispatch in the shipped body explicitly targets countries such as Argentina; behavior for other operating units depends on the corresponding regional package being present.