Search Results invoice_class




Overview

PABV_CUSTOMER_INVOICES is a read-only Oracle EBS view owned by the APPS schema and validated in both 12.1.1 and 12.2.2. It belongs to the Projects (PA) product family and presents a reporting-oriented projection of project draft invoices, combining billing header attributes with descriptive and lookup-driven columns. The view is defined WITH READ ONLY, meaning it cannot be used for DML and exists solely to support inquiry, reporting, and integration extraction. Its principal function is to translate internal code values into human-readable lookup meanings and to expose a derived INVOICE_CLASS column that classifies each draft invoice as an INVOICE, CREDIT_MEMO, WRITE_OFF, or CANCEL. Because the view is secured via a virtual column expression on PDI.ORG_ID, row-level access is enforced according to the operating unit context of the querying user. The view is documented as retrofitted, indicating it was introduced or aligned during a prior release consolidation rather than being part of the original schema design.

Underlying Base Objects

The view is defined over three documented base objects and one synonym reference set referenced through APPS:

  • PA_DRAFT_INVOICES_ALL (SYNONYM) — the primary driver, aliased PDI, supplying invoice header data and organization identifiers.
  • PA_PROJECTS_ALL (SYNONYM) — joined on PROJECT_ID to provide project context.
  • PA_LOOKUPS (VIEW) — joined with LOOKUP_TYPE = 'INVOICE_CLASS', supplying the meaning text for the classified invoice class.

The FROM clause references PA_DRAFT_INVOICES_ALL twice: once as PDI and again as PDIC, the latter being the self-join used with the outer-join operator (+) on PROJECT_ID and DRAFT_INVOICE_NUM_CREDITED. This self-join resolves the relationship between a credit memo and the invoice it credits. The WHERE clause combines the project join, the outer self-join, and the lookup join, then applies the multi-level DECODE that evaluates CANCELED_FLAG, WRITE_OFF_FLAG, and the presence of DRAFT_INVOICE_NUM_CREDITED in strict precedence order. The virtual organization security predicate (_SEC:PDI.ORG_ID) further restricts returned rows.

Key Columns

Common Use Cases and Queries

Typical scenarios include extracting released versus approved draft invoices, reporting unpaid transfer rejections, reconciling project billing to Receivables, and isolating credit memos and write-offs for audit. The INVOICE_CLASS column is the most common filter target, since the view was evidently built to answer "invoice class" questions without requiring the user to reconstruct the DECODE logic.

SELECT project_id, draft_invoice_num, invoice_class,
       ar_invoice_number, invoice_date, unearned_revenue_cr
FROM   apps.pabv_customer_invoices
WHERE  invoice_class = 'CREDIT_MEMO'
AND    creation_date >= :start_date;

A second common pattern aggregates by class for management reporting:

SELECT invoice_class, COUNT(*) inv_count,
       SUM(unbilled_receivable_dr) total_dr
FROM   apps.pabv_customer_invoices
WHERE  org_id = :org_id
GROUP  BY invoice_class;

Because the view is read-only and organization-secured, all queries are constrained by the caller's operating unit. Performance depends predominantly on the self-join to PA_DRAFT_INVOICES_ALL and the lookup join, so filters on PROJECT_ID, ORG_ID, and the invoice number columns are recommended.