Search Results get_billing_date
Overview
PA_BILLING_CYCLES_PKG is a public PL/SQL package owned by APPS in Oracle E-Business Suite, classified in ETRM documentation under the API classification "OTHER." It encapsulates the date arithmetic that governs the Oracle Projects billing cycle schedule, resolving the date on which an unearned revenue or invoice event should be billed for a given project and billing cycle combination. The package is declared AUTHID CURRENT_USER, so it executes with the privileges of the calling schema and relies on APPS synonyms to reach the underlying PA tables.
Billing cycles in Oracle Projects define a recurring cadence — such as weekly, monthly, or on a fixed calendar day — and an associated billing offset in days. This package supplies the date calculation logic that determines billing and bill-through dates for that cadence, allowing billing forms, concurrent programs, and extension code to derive schedule dates consistently rather than reimplementing calendar logic. Nine other packages reference it, confirming that it acts as a shared utility within the Projects billing stack rather than as a standalone entry point.
Key Procedures and Functions
The package exposes four documented functions, all carrying the pragma RESTRICT_REFERENCES (Get_Billing_Date, WNDS, WNPS):
- GET_BILLING_DATE — Returns a date. It is the object of the user's search and the core calculator for a project's billing date, accepting the project identifier, project start date, billing cycle identifier, bill-through date, and last bill-through date as its inputs.
- GET_NEXT_BILLING_DATE — Returns the subsequent billing date. Parameters default to NULL in the source declaration, allowing callers to supply only the values they hold and let the package infer the remainder. It also accepts a billing offset in days.
- GET_LAST_BILL_THRU_DATE — Accepts a project identifier and returns the most recent bill-through date already established for that project, providing the anchor value consumed by the other date functions.
- GET_LAST_RELEASED_INVOICE_NUM — Accepts a project identifier and returns the last released invoice number for that project, supporting invoice continuation and audit logic alongside the date calculations.
Because the functions are declared with the WNDS and WNPS purity levels, they can be invoked from SQL statements and from PL/SQL contexts that require those guarantees; they read database state and package state but write neither.
Tables Accessed
Per ETRM metadata, the package resolves data through APPS synonyms over the following tables:
- PA_BILLING_CYCLES — Defines the cycle cadence and associated offset attributes used to compute billing intervals.
- PA_PROJECTS_ALL — Supplies project-level attributes, including the project start date used as the baseline for cycle computation.
- PA_DRAFT_INVOICES and PA_DRAFT_INVOICES_ALL — Provide previously generated invoice records used to determine the last bill-through date and the last released invoice number for a project.
- DUAL — Used for scalar valuation, consistent with the function's suitability for SQL invocation.
Usage Notes
PA_BILLING_CYCLES_PKG is normally invoked indirectly. Oracle Projects billing forms and the invoice generation concurrent programs call it when determining billing dates for a project, and the nine dependent packages reuse its calculation logic in their own billing workflows. Custom extensions, PL/SQL scripts, and reports that need the billing date for a project or cycle combination should call GET_BILLING_DATE rather than duplicating the calendar rules, since the package centralizes behavior such as offset application and bill-through boundary handling. When integrating, ensure the session has visibility to the APPS synonyms for the PA tables and treat the functions as read-only queries, given the declared purity constraints.
-
PACKAGE: APPS.PA_BILLING_CYCLES_PKG
12.1.1
-
PACKAGE: APPS.PA_BILLING_CYCLES_PKG
12.2.2
-
PACKAGE BODY: APPS.PA_BILLING_CYCLES_PKG
12.2.2
-
PACKAGE: APPS.AR_BFB_UTILS_PVT
12.1.1
-
PACKAGE: APPS.AR_BFB_UTILS_PVT
12.2.2
-
PACKAGE BODY: APPS.PA_BILLING_CYCLES_PKG
12.1.1
-
PACKAGE BODY: APPS.AR_BFB_UTILS_PVT
12.2.2
-
PACKAGE BODY: APPS.AR_BFB_UTILS_PVT
12.1.1
-
APPS.PA_BILLING_CYCLES_PKG dependencies on PA_BILLING_CYCLES
12.2.2
-
APPS.PA_BILLING_CYCLES_PKG dependencies on PA_BILLING_CYCLES_PKG
12.1.1
-
APPS.PA_BILLING_CYCLES_PKG dependencies on PA_BILLING_CYCLES_PKG
12.2.2
-
APPS.PA_BILLING_CYCLES_PKG dependencies on PA_BILLING_CYCLES
12.1.1
-
PACKAGE BODY: APPS.LNS_BILLING_BATCH_PUB
12.1.1
-
PACKAGE BODY: APPS.LNS_BILLING_BATCH_PUB
12.2.2
-
APPS.LNS_BILLING_BATCH_PUB dependencies on FND_LOG
12.1.1
-
APPS.LNS_BILLING_BATCH_PUB dependencies on FND_LOG
12.2.2
-
APPS.LNS_BILLING_BATCH_PUB dependencies on FND_MSG_PUB
12.1.1
-
APPS.LNS_BILLING_BATCH_PUB dependencies on FND_API
12.1.1
-
APPS.LNS_BILLING_BATCH_PUB dependencies on FND_MSG_PUB
12.2.2
-
APPS.LNS_BILLING_BATCH_PUB dependencies on FND_API
12.2.2