Search Results master_item




Overview

JA_CN_CUSTOM_SOURCES is an Oracle E-Business Suite PL/SQL package body owned by the APPS schema that supports the Chinese localized taxation and invoice reporting functionality (the JA_CN product family). Its primary business purpose is to derive and return "customer source" values that are consumed by Chinese localizations for invoice classification, gain/loss categorization, and project-related reporting. The package creates and resolves source attributes used when invoice data must be mapped to a reporting category, particularly where refund associations or category-driven derivation rules apply.

The body is delivered as the source file JACNSCSB.pls and has been maintained under Oracle's standard versioning header scheme. Several hardening fixes were applied between 2009 and 2013, including bug fixes 8402674 and 8478003, which introduced the private Refund_Item function to handle invoices associated with refunds and added runtime instrumentation via FND_LOG. The package body exposes three documented callable units and is referenced by one other package within the application, indicating that it is a shared utility used by higher-level Chinese localization logic rather than being a standalone user-facing process.

Key Procedures and Functions

Three documented program units are exposed by this package body:

  • INVOICE_CATEGORY — The principal public procedure. It resolves the appropriate customer source or category value for a given invoice context. It is the entry point most commonly relied upon by external callers and is designed to translate invoice data into the category representation required by Chinese localization reporting.
  • INVOICE_GAINLOSS_CATEGORY — Derives the category to which exchange-rate gain or loss on an invoice should be assigned. This supports correct classification of foreign-currency gain/loss amounts in Chinese VAT and invoice reporting.
  • GET_PROJECT_NUM — Returns the project number associated with the invoice or invoice line being evaluated. This value is required where Chinese localization reporting must attribute invoiced amounts to a project reference.
  • Refund_Item (private) — Although not part of the documented public interface, this function is shown in the source excerpt. It returns a source value when an invoice is associated with a refund, and receives the invoice identifier as its input.

Parameter lists are not reproduced here; callers should consult the package specification for exact signatures.

Tables Accessed

The package reads data from the following tables through APPS synonyms:

  • AP_INVOICES_ALL — Provides the invoice header, including invoice type and association, used to determine refund and category logic.
  • AP_INVOICE_DISTRIBUTIONS_ALL — Supplies distribution-level detail used when deriving categories at the accounting distribution level.
  • AP_INVOICE_LINES_ALL — Source of invoice line attributes, including project and line context.
  • AP_INVOICE_PAYMENTS_ALL — Used to establish payment and refund relationships on the invoice.
  • MTL_CATEGORY_SETS_TL and MTL_ITEM_CATEGORIES — Employed to resolve item category assignments, including the master item category hierarchy relevant to the searched term "master_item".
  • PA_PROJECTS_ALL — Supplies project data supporting GET_PROJECT_NUM.
  • PO_LINES_ALL — Provides purchase order line information for invoices originating from procurement documents.

Usage Notes

JA_CN_CUSTOM_SOURCES is not intended for direct end-user invocation. It is typically called from Chinese localization forms, concurrent programs, or other localization packages that need a resolved source or category value for an invoice. Because the package performs no DML on the listed tables, it is safe to call in read-only contexts, though it depends on accurate AP, PO, and inventory category data being present. The FND_LOG instrumentation allows debugging by enabling procedure-level logging. Customizations should call the public routines rather than the private Refund_Item function, which is subject to change without notice.