Search Results jl_ar_ap_undo_temp_withholding




Overview

JL_AR_AP_WITHHOLDING_PKG is an Oracle E-Business Suite PL/SQL package owned by the APPS schema that implements Argentine withholding tax (AWT) processing for the Payables and Receivables flows. Its primary responsibility is to calculate, apply, reverse, and report withholding amounts associated with supplier invoices, invoice distributions, and payments. The package is declared with AUTHID CURRENT_USER, meaning that execution privileges and name resolution follow the invoking schema rather than the defining schema.

The package defines shared constants and record types that formalize the interface used throughout the Argentine localization. AWT_SUCCESS and AWT_ERROR are propagated from JL_ZZ_AP_WITHHOLDING_PKG, providing the standard return codes used by every public routine. The DUMMY_INVOICE_ID constant (-1) supports placeholder processing where a real invoice identifier is not yet available. The Rec_Payment_Withholding and Rec_Invoice_Amount record types, together with the Tab_Amounts associative array, carry tax type codes, vendor and site identifiers, invoice distribution references, taxable bases, prorated tax-inclusive amounts, and payment amounts between the internal processing units of the main withholding routine.

Key Procedures and Functions

  • JL_AR_AP_DO_WITHHOLDING — The main Argentine withholding tax calculation routine. It computes withholding amounts across invoices and invoice distributions using the supplied payment and tax-base information, and is the entry point for applying new withholdings.
  • JL_AR_AP_UNDO_WITHHOLDING — Reverses previously applied withholding amounts, restoring the affected invoice, distribution, and payment records to their pre-withholding state.
  • JL_AR_AP_VOID_SELEC_CERTIF — Handles voiding of selected withholding certificates, ensuring that certificate records and their associated tax entries remain consistent.
  • JL_AR_AP_UNDO_TEMP_WITHHOLDING — Removes temporary withholding rows held in the temporary distributions table, typically used to roll back interim calculations that were never finalized.
  • JL_AR_AP_CERTIFICATES — Generates and manages withholding certificates, the legal documents that evidence tax withheld from suppliers.
  • JL_CALL_DO_AWT — A wrapper-style invocation routine that drives the withholding calculation, allowing callers (such as payment processing hooks) to request withholding without directly coupling to the core procedure.
  • UNDO_QUICK_PAYMENT — Reverses withholding effects tied to Quick Payment processing when a quick payment is undone.

Tables Accessed

The package reads and writes AP_INVOICES, AP_INVOICE_DISTRIBUTIONS, AP_INVOICE_PAYMENTS, and AP_PAYMENT_SCHEDULES to determine invoice lines, taxable bases, and payment amounts. AP_CHECKS and AP_SUPPLIERS/AP_SUPPLIER_SITES_ALL supply payment, vendor, and site context, while AP_SYSTEM_PARAMETERS_ALL provides organizational setup. Temporary and selection data live in AP_AWT_TEMP_DISTRIBUTIONS, AP_INV_SELECTION_CRITERIA_ALL, and AP_SELECTED_INVOICES. Payment hook integration uses IBY_HOOK_DOCS_IN_PMT_T and IBY_HOOK_PAYMENTS_T. Withholding rates and legal configuration are stored in JL_AR_AP_SUP_AWT_CR_LTS and its _S child table.

Usage Notes

JL_AR_AP_WITHHOLDING_PKG is invoked during Payables invoice and payment processing, including Quick Payment, when Argentine withholding rules apply. It is referenced by three other packages, indicating that it serves as a shared localization service rather than a standalone utility. Because AWT_ERROR is one of its defined constants, callers should always check the returned status and inspect the package error handling when the value AWT_ERROR is returned. The package should be treated as internal localization infrastructure; custom code should not modify its tables directly but instead invoke the documented procedures through supported entry points.