Previous  Next          Contents  Index  Navigation  Glossary  Library

Writing Automatic Invoice Approve/Release Extensions

Oracle Projects provides a template package and procedure that you use as the basis of your automatic invoice approve/release extension procedures. The name of the template package is pa_client_extn_inv_actions. The names of the procedures are:

Print out the following files before you begin writing automatic invoice approve/release extensions. The files are located in the Oracle Projects admin/sql directory.

PAXPIACS.pls Invoice Action Client Extension Package Specification Template. If you create procedures outside the predefined procedure within the pa_client_extn_inv_actions package, you must also modify this file to include those new procedures.
PAXPIACB.pls Invoice Action Client Extension Package Body Template. This file contains the procedure that you can modify to implement the automatic invoice approve/release extension.

Suggestion: After you write the procedure, do not forget to compile it and store it in the database. See: Writing PL/SQL Procedures.

Package Procedures

pa_client_extn_inv_actions.approve_invoice

Table 1 - 121 lists the parameters that Oracle Projects provides for the invoice approval extension.

Parameter Usage Type Description
p_project_id
 
IN NUMBER Identifier of the project to which the draft invoice number is attached.
p_draft_ invoice_num IN NUMBER The draft invoice number.
p_invoice_class IN VARCHAR2 The class of the invoice.
p_invoice_amount IN NUMBER Amount on the invoice.
x_approve_flag OUT VARCHAR2 Invoice approval flag. Valid values:
Y = Yes (approve invoice)
any other value = do not approve
x_status OUT NUMBER Status of the procedure:
0 = successful execution
<0 = Oracle8 error
>0 = application error

pa_client_extn_inv_actions.release_invoice

Table 1 - 122 lists the parameters that Oracle Projects provides for the invoice release extension.

Parameter Usage Type Description
p_project_id
 
IN NUMBER Identifier of the project to which the draft invoice number is attached.
p_draft_ invoice_num IN NUMBER The draft invoice number.
p_invoice_class IN VARCHAR2 The class of the invoice.
p_invoice_amount IN NUMBER Amount on the invoice.
x_release_flag OUT VARCHAR2 Invoice release flag. Valid values:
Y = Yes (release invoice)
any other value = do not release
x_ra_invoice_date OUT DATE Receivable invoice date. Validation on this parameter is performed only when x_release_flag = Y.
x_ra_invoice_num OUT NUMBER Receivable invoice number. If automatic invoice numbering is active, then this parameter is not required. Validation on this parameter is performed only when x_release_flag = Y.
x_status OUT NUMBER Status of the procedure:
0 = successful execution
<0 = Oracle8 error
>0 = application error

Additional Information About Parameters

Using Invoice Class

The valid values of x_invoice_class are:

INVOICE regular invoice
CREDIT_MEMO crediting invoice
WRITE_OFF write-off invoice
CANCEL canceling invoice

Using Status

Use the x_status parameter to handle error conditions for your procedure. This parameter indicates the processing status of your extension as follows:

x_status = 0 The extension executed successfully.
x_status < 0 An Oracle8 error occurred and the process did not complete. Oracle Projects writes an error message to the process log file.
x_status > 0 An application error occurred. Oracle Projects writes a rejection reason to the PA_DISTRIBUTION_WARNINGS table. The invoice is not approved or released.


         Previous  Next          Contents  Index  Navigation  Glossary  Library