Results for “generate_inv”

14 results




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

Overview

APPS.PA_PROJ_BILLING_DETAIL_VIEW is a reporting view within the Oracle E-Business Suite Projects (PA) module that consolidates project-level billing information for invoice generation processing. The view is primarily consumed by the Generate Invoices workflow and associated concurrent programs, which pass the action code GENERATE_INV to project status validation logic. Its central purpose is to present a unified result set of projects eligible for billing, together with derived billing dates and lifecycle indicators, so that downstream processes can determine which projects may be invoiced and what the next billing milestone should be.

The view is structured as a UNION ALL of multiple SELECT statements, each addressing a different billing scenario. The first branch handles projects that already have a released draft invoice, joining to PA_DRAFT_INVOICES to retrieve the last released draft invoice number, invoice date, and bill-through date. Additional branches handle projects with no prior released invoice (returning null invoice attributes) and event-based versus work-based invoice methods, distinguished through a DECODE against the project's invoice method. A constant classifier ('EVENT' or 'WORK') is returned as the first column to indicate the billing type.

Underlying Base Objects

Per the documented metadata, the view references the following objects:

  • PA_PROJECTS_ALL – the master project definition table supplying project_id, segment1, name, invoice_method, billing attributes, and status.
  • PA_PROJECT_TYPES_ALL – joined to restrict output to project types where direct_flag = 'Y', ensuring only directly billable project types qualify.
  • PA_DRAFT_INVOICES – provides draft invoice number, invoice date, and bill-through date through a synonym.
  • PA_DRAFT_INVOICE_ITEMS, PA_DRAFT_REVENUES, PA_DRAFT_REVENUE_ITEMS, PA_EVENTS, PA_PROJECTS – additional synonyms referenced for the billing/event data model.
  • PA_PROJECT_UTILS (package) – invoked as Check_prj_stus_action_allowed(status_code, 'GENERATE_INV'), returning 'Y' when the project status permits invoice generation.
  • PA_BILLING_CYCLES_PKG (package) – supplies Get_Next_Billing_Date and Get_Last_Released_Invoice_Num, driving the derived billing date and last-invoice logic.

Key Columns

  • Billing type classifier – DECODE of invoice_method producing 'EVENT' or 'WORK'.
  • PROJECT_ID, SEGMENT1, NAME – project identifiers and descriptive attributes.
  • RETN_ACCOUNTING_FLAG – NVL'd to 'N'; retained earnings accounting indicator.
  • Draft invoice number, invoice date, bill-through date – sourced from PA_DRAFT_INVOICES; null when no prior released invoice exists.
  • Aging/age-in-days column – TRUNC(SYSDATE) - NVL(invoice_date, NVL(start_date, creation_date)), rounded, indicating elapsed days since last activity.
  • Next billing date – computed via PA_Billing_Cycles_Pkg.Get_Next_Billing_Date using project start date, billing cycle, and offset.
  • ENABLE_TOP_TASK_INV_MTH_FLAG – controls top-task invoice method behavior.
  • Multiple zero-valued placeholder columns – reserved for downstream aggregation or interface staging.

Common Use Cases and Queries

The view is typically queried to identify billable projects and their next billing milestones, particularly within invoice generation diagnostics. A representative query:

  • SELECT project_id, segment1, name, next_billing_date FROM apps.pa_proj_billing_detail_view WHERE billing_type = 'WORK'; – lists work-based billable projects and their upcoming billing dates.
  • SELECT project_id, draft_invoice_num, invoice_date FROM apps.pa_proj_billing_detail_view WHERE draft_invoice_num IS NOT NULL; – identifies projects with released draft invoices.
  • Joining the view to PA_DRAFT_INVOICES or PA_PROJECTS for reconciliation of billing eligibility against the Generate Invoices process.

Because the view embeds package function calls per row, queries against it may be resource-intensive on large project sets and should generally be constrained by PROJECT_ID or organization.