Search Results cf_rec_tax_calcformula




Overview

JE_ZZ_AUDIT_AP_PKG is a PL/SQL package owned by the APPS schema and declared with AUTHID CURRENT_USER, meaning its statements execute under the privileges of the calling user rather than the package owner. The package supports Oracle E-Business Suite localization and statutory reporting requirements around Accounts Payable, most notably VAT audit reporting. Its naming and the presence of reporting-entity parameters (P_VAT_REPORTING_ENTITY_ID), together with references to the JG_ZZ_VAT_REP_ENTITIES and JG_ZZ_VAT_REP_STATUS tables, indicate it is a reporting back-end rather than a transactional API. The source header (jezzauditaps.pls, version 120.2, dated 2006) confirms it is a legacy reporting package that has been carried forward through the 12.1.1 and 12.2.2 code lines. The package exposes a mix of global package variables, one main report entry point (BeforeReport), helper procedures and several formula functions that are designed to be referenced as Oracle Reports or BI Publisher formula columns.

Key Procedures and Functions

The package exposes approximately twenty-three documented program units. The primary entry point is BEFOREREPORT, a report-level function used to initialize parameters, session globals and boilerplate before the report query executes. G_COMPANYGROUPFILTER, the object referenced by the search term "g_companygroupfilter", is a function taking a company input string and returning a BOOLEAN; it is used as a data-source filter to restrict AP audit/VAT report output to a specific company or company group based on the calling user's access.

Supporting procedures include GET_LOOKUP_MEANING, which resolves a lookup type and code into its meaning, and GET_BOILER_PLATES, which populates static header and footer text for the report layout. A further helper, GET_BALANCING_SEGMENT, derives the balancing segment value for the accounting flexfield context. Display-control procedures SET_DISPLAY_FOR_CORE and SET_DISPLAY_FOR_GOV toggle layout behaviour for corporate versus government deployment variants.

The remaining functions are calculation and display formulas: C_PAYMENT_AMTFORMULA computes payment amounts by tax and invoice type; CF_REC_TAX_CALCFORMULA and CF_TAX_AMTFORMULA compute recoverable and gross tax amounts; CF_TXBL_DISCOUNT_AMTFORMULA, CF_ITEM_TAX_AMTFORMULA and CF_REAL_INV_AMTFORMULA handle taxable discount, item-level tax and real invoice value respectively; C_PRT_AMT_TXBLFORMULA and C_PRT_INV_AMTFORMULA produce printable taxable and invoice amounts. Display-only formulas G_DATA_FOUND_FORMULA, G_CURR_NAME_FORMULA, G_COMPANY_TITLE_FORMULA, G_PRECISION_FORMULA and G_LEDGER_CURR_FORMULA retrieve global variable values for currency name, company title, numeric precision and ledger currency.

Tables Accessed

The package reads against APPS synonyms spanning four functional areas. Accounts Payable invoice data is read from AP_INVOICES, AP_INVOICE_LINES, AP_INVOICE_DISTRIBUTIONS and AP_INVOICE_PAYMENTS, while payment and check details come from AP_CHECKS and AP_CHECKS_ALL, with AP_SYSTEM_PARAMETERS supplying setup defaults. Subledger accounting detail is obtained from XLA_AE_HEADERS, XLA_AE_LINES, XLA_ACCT_CLASS_ASSGNS, XLA_ASSIGNMENT_DEFNS_B and XLA_DISTRIBUTION_LINKS, allowing the report to reconcile AP transactions to their accounting entries. VAT reporting status and entity information are sourced from JG_ZZ_VAT_REP_ENTITIES, JG_ZZ_VAT_REP_STATUS and the JG_ZZ_VAT_TRX_GT global temporary table, which acts as the report's working data set.

Usage Notes

JE_ZZ_AUDIT_AP_PKG is not an application programming interface. Its classification is OTHER, and it is not referenced by any other package, so it is consumed directly by a report definition rather than being called programmatically. Typical invocation paths are the Oracle Reports or BI Publisher audit/VAT extracts that use BeforeReport as the report trigger and the CF_* and G_*_FORMULA functions as formula columns. G_COMPANYGROUPFILTER must be wired into the report's data model query to enforce company access. Because the package executes with AUTHID CURRENT_USER, callers must hold the necessary AP, XLA and JG privileges, and any custom code invoking it should supply a valid ledger and reporting-entity context in the package globals first. It is compatible with both EBS 12.1.1 and 12.2.2, requiring no changes for the 12.2 subledger accounting architecture because it already queries XLA tables.