7 Generating Proforma Invoices
Learn how to generate a proforma invoice to expedite the invoicing process in Oracle Communications Billing and Revenue Management (BRM).
About Proforma Invoices
Proforma invoice billing is an initial, optional step in the billing process. It is similar to final billing, however, it does not finalize the bill. It creates a pre-invoice that your customers can review for accuracy before the final bill and invoice are generated. Afterward, your customers can manually accept or reject the proforma invoice.
You typically create proforma invoices for customers with very large bills and invoices because they help improve your customers’ cash flow.
Proforma invoices can use the same or a different template than your final invoices. Unlike final invoices, they include:
- Details for a specific invoice period
- The current date rather than the billing day of month (DOM)
- A different bill and invoice number
- A watermark indicating that it is a proforma invoice
Note:
Proforma bills and invoices should not be included in any external reports.Note:
If the validity period is 0, the invoices can never be automatically accepted, since they are valid indefinitely.About the Customer Process
After your customers receive a proforma invoice, they can do one of the following:
- Accept the Proforma Invoice: BRM immediately generates a real
invoice with a unique invoice number, an updated invoice date, and a due date. The
charges on the real invoice will match those on the proforma invoice.
Note:
For PIN_ACTG_TYPE_BALANCE_FORWARD accounting type, you can only accept an invoice if all of the bill unit's previous invoices are accepted. Otherwise, BRM throws a validation error. - Modify the Proforma Invoice: If your customers want to make changes to a proforma invoice, they must first reject it. Then, they can specify to remove or add events or items, or to move items from one bill to another. After the modifications are complete, you must generate a new proforma invoice for the customer.
- Reject the Proforma Invoice: All items and events associated with the proforma invoice become available for correction.
About the Proforma Invoice Process
You generate proforma invoices using the pin_bill_accts utility or an external client application. For more information, see:
- "Creating bills for Proforma Invoices Using pin_bill_accts" in BRM Configuring and Running Billing
-
"Managing Proforma Invoices" in BRM Opcode Guide
The following outlines the proforma invoice process:
- Initial Run: Proforma invoice billing moves bills from the InProgress state to the PreInvoiceInProgress state, freezing all items to prevent A/R operations from occurring on them. It updates dates and item statuses, applies taxes and discounts, and generates a proforma invoice.
- Approval or Rejection: Your customer approves or rejects the
proforma invoice:
- If approved, BRM automatically generates a real invoice with all the items from the proforma invoice.
- If rejected, all items and events associated with the proforma invoice become available for the customer to correct before you regenerate the proforma invoice.
- If the validity period ends and your customer has not accepted or rejected the invoice, BRM automatically approves the invoice and generates a real invoice. By default, the invoices are valid indefinitely.
- Regenerate: (Optional) If the invoice is rejected, BRM modifies the rejected invoice and its associated items, by removing or adding items to the proforma invoice. You must provide the bill object poid ID to initiate the re-run. It then identifies and processes all pending items related to the specified bill.
About Generating Proforma Invoices for Wholesale and Hierarchy Accounts
You can generate proforma invoices for accounts with hierarchical relationships, such as parent and child accounts.
- Generating a Proforma Invoice: Proforma invoices are generated for the child accounts first. The final invoice is generated only for the parent account.
- Accepting: Once the proforma invoices for the child accounts are
generated, proforma invoices are generated for the parent account. During this
process, charges from child account items are rolled up to the parent item, reducing
the total bill of the child account to zero.
Note:
You must accept the proforma invoices of all child accounts before accepting the paremt account's proforma invoice. - Rejecting: The proforma invoice of the parent account is rejected first, then the proforma invoice of the child account is rejected. After this, the specific child bill items are open for A/R operations.
- Regenerating: Proforma invoices for the child accounts are regenerated, followed by the proforma invoice for the parent account. Once the proforma invoice for the parent account is regenerated, charges are rolled up to the parent account.
Setting Up BRM to Generate Proforma Invoices
-
(Optional) Define the default validity for proforma invoices. See "Defining the Default Validity Period of Proforma Invoices".
-
(Optional) Create a custom template for proforma invoices in Oracle Analytics Publisher. For more information on custom templates, see "Designing Invoices".
-
(Optional) Change the watermark in the proforma invoice template. See "Changing the Watermark for the Proforma Invoice".
-
Customize your client application to manage proforma invoices. See "Customizing Your Client Applications to Manage Proforma Invoices".
Afterward, you can start generating proforma invoices.
Defining the Default Validity Period of Proforma Invoices
Customers can accept or reject the proforma invoices within a particular time window after the proforma invoice has been generated. This time window is the validity period of the proforma invoice. You can set the validity period of your proforma invoice by setting the PreInvoiceValidity business parameter. The default validity period is 0 days, making them valid indefinitely.
After the validity due date, BRM automatically approves the proforma invoices.
To define the default validity period:
- Go to BRM_home/sys/data/config.
- Use the following command to create an editable XML file
from the billing instance of the /config/business_params
object:
pin_bus_params -r BusParamsBilling bus_params_billing.xml
This command creates an XML file named bus_params_billing.xml.out in your current directory. If you do not want this file in your current directory, specify the path as part of the file name.
- In bus_params_billing.xml.out, set the following
entry:
Where value is the default validity period for proforma invoices. The default validity is 0 days, making them valid indefinitely.<PreInvoiceValidity>value</PreInvoiceValidity>
Caution:
BRM uses the XML in this file to overwrite the existing instance of the /config/business_params object. If you delete or modify any other parameters in the file, these changes affect the associated aspects of the BRM configuration.
- Save and exit the file.
- Rename the bus_params_billing.xml.out file to bus_params_billing.xml.
- Use the following command to load your changes into the
/config/business_params
object:
pin_bus_params bus_params_billing.xml
You should run this command from the BRM_home/sys/data/config directory, which includes support files used by the utility. To run it from a different directory, see "pin_bus_params" in BRM Developer's Guide.
- Read the object with the testnap utility or the Object Browser to
verify that all fields are correct.
For general instructions on using testnap, see "Using the testnap Utility to Test BRM" in BRM Developer's Guide. For information on how to use Object Browser, see "Reading Objects" in BRM Developer's Guide.
- Stop and restart the Connection Manager (CM).
For more information, see "Starting and Stopping the BRM System" in BRM System Administrator's Guide.
Note:
You can override the validity period for specific proforma invoices based on customer criteria by using the PCM_OP_BILL_POL_CALC_PYMT_DUE policy opcode. For more information, see "Managing Proforma Invoices" in BRM Opcode Guide.
Changing the Watermark for the Proforma Invoice
Proforma invoices have a watermark. By default, the watermark text is PROFORMA INVOICE.
To change the text of the watermark, set the PIN_FLD_MESSAGE field in the PCM_OP_INV_MAKE_INVOICE opcode to the text you want to see as the watermark. For more information, see "Managing Proforma Invoices" in BRM Opcode Guide.
Customizing Your Client Applications to Manage Proforma Invoices
If you use a custom client application to manage invoices, you must customize it to:
- Generate, accept, or reject proforma invoices by calling the PCM_OP_BILL_MAKE_BILL opcode. See "Managing Proforma Invoices" in BRM Opcode Guide.
- Move items from one bill to another by calling the PCM_OP_BILL_MOVE_ITEM opcode. See “Moving Bill Items” in BRM Opcode Guide.
Managing Proforma Invoices with pin_bill_accts
You can use the pin_bill_accts utility to accept, reject, and regenerate proforma invoices:
Generating Proforma Invoices with pin_bill_accts
You can generate a proforma invoice using the pin_bill_accts utility.
- To generate a proforma invoice for all your bills and items, run the
following
command:
pin_bill_accts -preinvoice bill -verbose
- To generate a proforma invoice for a specific set of accounts using
an XML input file, run the command using the -file
option:
pin_bill_accts -preinvoice bill -file fileName.xml
For more information on fileName, see "Configuring the XML File for Proforma Invoices".
- To generate a proforma invoice for a specific set of accounts in an
flist format, you use a properly formatted text file and run the command using
the -from_file
option:
pin_bill_accts -preinvoice bill -from_file fileName.txt
For more information on fileName, see "Configuring the Text File for Proforma Invoices".
Accepting Proforma Invoices with pin_bill_accts
If all of the items in the proforma invoice are correct, you can accept it.
- To accept all the proforma invoices generated, run the following
command:
pin_bill_accts -preinvoice accept -verbose
- To accept a proforma invoice for a specific set of accounts using
an XML input file, run the command using the -file
option:
pin_bill_accts -preinvoice accept -file fileName.xml
For more information on fileName, see "Configuring the XML File for Proforma Invoices".
- To accept a proforma invoice for a specific set of accounts in an
flist format, you use a properly formatted text file and run the command using
the -from_file
option:
pin_bill_accts -preinvoice accept -from_file fileName.txt
For more information on fileName, see "Configuring the Text File for Proforma Invoices".
Rejecting Proforma Invoices with pin_bill_accts
If you are not satisfied with the proforma invoice generated, you can reject it.
- To reject all the proforma invoices generated, run the following
command:
pin_bill_accts -preinvoice reject -verbose
- To reject a proforma invoice for a specific set of accounts using
an XML input file, run the command using the -file
option:
pin_bill_accts -preinvoice reject -file fileName.xml
For more information on fileName, see "Configuring the XML File for Proforma Invoices".
- To reject a proforma invoice for a specific set of accounts in an
flist format, you use a properly formatted text file and run the command using
the -from_file
option:
pin_bill_accts -preinvoice reject -from_file fileName.txt
For more information on fileName, see "Configuring the Text File for Proforma Invoices".
When the proforma invoice is rejected, the items in the proforma invoice are no longer frozen and A/R operations are allowed on them. Then, you can make corrections, including moving the disputed items to another bill in the bill unit. You move bill items by calling the PCM_OP_BILL_MOVE_ITEM opcode. For more information, see "Moving Bill Items" in BRM Opcode Guide.
Regenerating Proforma Invoices
You can regenerate a proforma invoice for the rejected items using the pin_bill_accts utility or the PCM_OP_BILL_MAKE_BILL opcode. To regenerate a proforma invoice using the opcode, see "Managing Proforma Invoices in BRM Opcode Guide".
pin_bill_accts -preinvoice bill -file fileName
The utility identifies the proforma bill poid ID from the input file, and regenerates the corresponding bill.
Upon regeneration, the corresponding bill and its items are modified and moved back to the PreInvoiceInProgress and PIN_ITEM_STATUS_OPEN states respectively. Then, the regenerated proforma invoice can be accepted and the final invoice can be generated.
Configuring the XML File for Proforma Invoices
To configure the XML file to generate, accept, and reject proforma invoices,
you use the sample file pin_bill_run_control.xml in the
BRM_home/apps/pin_billd directory. Use the <Bill>
tag to accept, reject, and regenerate proforma invoices.
<BusinessConfiguration>
<BillRunConfiguration>
‹BillingList>
<Account>123456</Account>
<Billinfo>123456</Billinfo>
<Bill>123456789012345678</Bill›
</BillingList>
</BillRunConfiguration>
</BusinessConfiguration>
Configuring the Text File for Proforma Invoices
You can configure data in an flist format to generate, accept, and reject proforma invoices, by configuring it in a text (.txt) file.
0 PIN_FLD_RESULTS ARRAY [0] allocated 20, used 2
1 PIN_FLD_ACCOUNT_OBJ POID [0] 0.0.0.1 /account 123456 0
1 PIN_FLD_POID POID [0] 0.0.0.1 /billinfo 123456 0
1 PIN_FLD_BILL_OBJ POID [0] 0.0.0.1 /bill 123456789012345678 0
Note:
The PIN_FLD_BILL_OBJ poid ID is only used to accept, reject, or regenerate a specific proforma invoice.