Results for “format_amount”

50+ results




AI-generated from documented ETRM metadata — verify critical details on the linked pages.

Overview

The APPS.JE_ES_MODELO_EXT_PKG package body is a Spanish localized (ES) extension used in Oracle E-Business Suite 12.1.1 and 12.2.2 to support Spanish tax reporting requirements, particularly the Modelo 340 and related VAT/SII-era localizations delivered through the JE (Journal Entry) product family. The package encapsulates address retrieval and formatting logic required to produce legally compliant Spanish tax reports. It supplies formatted postal codes, city names, and address detail strings for both suppliers and customers, applying Spanish-specific rules where the country code is 'ES' and falling back to European Union territory codes for non-Spanish addresses. These address fields feed the layout of statutory Spanish reporting extracts that Oracle EBS must generate out of the box.

Key Procedures and Functions

The documented package metadata lists four procedures/functions. In addition, the source excerpt reveals two address helper procedures relevant to the searched term get_customer_address.

  • get_customer_address — The procedure matching the user search. It accepts a customer address identifier and returns formatted postal code, city, and address detail outputs. It reads HZ_LOCATIONS data, applying a decode rule that truncates Spanish postal codes to two digits followed by '000', and otherwise prefixes '99' plus the EU territory code.
  • get_vendor_address — Companion procedure returning supplier postal code, city, and address detail. A code comment (bug#5031773) documents that the cursor was corrected to reference AP_SUPPLIER_SITES_ALL instead of HZ_PARTY_SITES_ALL and HZ_LOCATIONS, because the passed identifier is a supplier_site_id rather than a party_site_id.
  • BEFORE_REPORT — Report initialization logic.
  • AFTER_REPORT — Post-report cleanup logic.
  • GETKEYID — Key identifier retrieval.
  • FORMAT_AMOUNT — Currency-aware amount formatting using precision and currency code.

The package also declares globals for legal entity name and tax registration number (G_LE_TRN, G_LE_NAME), currency code and precision, reporting period dates (G_FROM_DATE, G_TO_DATE), and debug flags.

Tables Accessed

Documented tables referenced through APPS synonyms include: AP_SUPPLIER_SITES_ALL and AP_SUPPLIERS for vendor site addresses and party information used in get_vendor_address; HZ_LOCATIONS, HZ_PARTIES, HZ_CUST_ACCOUNTS, HZ_CUST_ACCT_SITES_ALL, HZ_CUST_SITE_USES_ALL and HZ_CONTACT_POINTS for customer address retrieval in get_customer_address; FND_TERRITORIES and FND_CURRENCIES for territory and currency lookup; AP_INVOICES_ALL, AP_INVOICE_DISTRIBUTIONS, AR_CASH_RECEIPTS_ALL and AR_RECEIVABLE_APPLICATIONS_ALL for transaction and tax base data; and GL_PERIODS to resolve accounting period boundaries for reporting windows.

Usage Notes

JE_ES_MODELO_EXT_PKG is invoked during generation of the Spanish Modelo statutory reports from Oracle EBS, typically through concurrent programs or report layouts that call BEFORE_REPORT, retrieve and format addresses and amounts, then invoke AFTER_REPORT. Because the package is referenced by zero other PL/SQL packages, it is a top-level extension rather than a shared utility. Custom Spanish localization code, Oracle-provided report templates, and any extension that must resolve supplier or customer addresses for Spanish tax reporting should call get_vendor_address and get_customer_address. Developers modifying or extending this package should be aware that the supplier address cursor depends on the correct site identifier semantics (supplier_site_id) introduced by bug#5031773.