Search Results delete_ar_trx_lines




Overview

JAI_AR_TRX_LINES_PKG is an Oracle E-Business Suite PL/SQL package owned by the APPS schema that supports Oracle's Localizations for India (JAI) functionality for Receivables tax processing. Its principal business function is to populate and maintain the JAI_AR_TRX_LINES shadow table, which stores India-specific tax attributes for receivable transaction lines that are not held on the standard RA_CUSTOMER_TRX_LINES_ALL table. The package is central to the automatic determination and recalculation of Indian taxes — including Modvat recovery, excise, VAT, service tax, and TDS-related amounts — on AR invoices, debit memos, credit memos, and adjustments. The header comment records the initial version as 115.1, created 13-June-2012 by qinglei against bug 14040855, and the current file version as 120.0.12020000.2 dated 2013/03/19.

Key Procedures and Functions

  • POPULATE_JAI_AR_LINES — Inserts or maintains the corresponding JAI_AR_TRX_LINES row for a given RA_CUSTOMER_TRX_LINES_ALL record. It accepts the transaction-line record and an action flag (insert/update/delete), and returns a standard return code and message pair.
  • DEFAULT_TAX — The procedure most commonly associated with the "default_tax" search. It derives the default tax attributes for an AR transaction line based on the new line record and the previously stored JAI_AR_TRX_LINES record, so that Indian taxes are defaulted automatically when lines are entered or changed.
  • GET_SERVICE_TYPE — A function returning the service type for a given party, party site, and party type. It is used to determine the correct tax treatment (for example, service tax applicability) for a customer or supplier location.
  • RECALCULATE_TAX_FOR_DM — Recalculates tax for debit memo transaction lines, comparing the old JAI_AR_TRX_LINES record to the new AR line record and writing back recalculated tax values.
  • RECALCULATE_TAX_FOR_INV_CM — Recalculates tax for invoice and credit memo lines, following the same old-record/new-record pattern as the debit memo routine.
  • DELETE_AR_TRX_LINES — Removes the India-specific JAI_AR_TRX_LINES entries associated with a transaction, typically invoked when a transaction line is deleted or cancelled.

Tables Accessed

The package reads and writes JAI_AR_TRX_LINES as its primary India-localization table. It reads standard Receivables tables RA_CUSTOMER_TRX_ALL and RA_CUSTOMER_TRX_LINES_ALL to obtain bill-to/ship-to parties and sites and the transaction line details. Customer site information is resolved from HZ_CUST_ACCT_SITES_ALL and HZ_CUST_SITE_USES_ALL. Tax determination logic draws on JAI_CMN_TAXES_ALL and JAI_CMN_TAX_CTGS_ALL, with withholding slabs and thresholds taken from JAI_AP_TDS_THHOLD_SLABS and JAI_AP_TDS_THHOLD_TAXES. Related localization tables JAI_AR_TRXS, JAI_AR_TRX_APPS_RELS_T, JAI_AR_TRX_INS_LINES_T, JAI_AR_TRX_TAX_LINES, and JAI_CMN_CUS_ADDRESSES hold transaction, installment, tax-line, and address context. Errors raised during processing are logged to JAI_CMN_ERRORS_T. The package is referenced by one other package within the JAI localization suite.

Usage Notes

JAI_AR_TRX_LINES_PKG is not a public Oracle API and is not intended for direct invocation by customers. It is called from Oracle Receivables localization forms and from AR transaction APIs when Indian tax defaulting is required, and by concurrent or personalization code that maintains JAI_AR_TRX_LINES. Callers pass the standard API parameters — the old JAI_AR_TRX_LINES record, the new RA_CUSTOMER_TRX_LINES_ALL record, the action flag, and the OUT return code and message — and must check the return code before committing. Because the package exists in both 12.1.1 and 12.2.2, references to it are generally portable across those releases, though the underlying AR and HZ tables may be accessed through APPS synonyms. Customizations that need Indian tax defaulting should invoke the documented procedures rather than manipulating JAI_AR_TRX_LINES directly.