1 package body PA_Client_Extn_Billing as
2 /* $Header: PAXICTMB.pls 120.1 2005/08/05 08:53:27 lveerubh noship $ */
3
4 procedure Calc_Bill_Amount( x_transaction_type in varchar2 default 'ACTUAL',
5 x_expenditure_item_id in number,
6 x_sys_linkage_function in varchar2,
7 x_amount in out NOCOPY number,
8 x_bill_rate_flag in out NOCOPY varchar2,
9 x_status in out NOCOPY number,
10 x_bill_trans_currency_code out NOCOPY varchar2, /* following 4 new columns added for MCB2 */
11 x_bill_txn_bill_rate out NOCOPY number,
12 x_markup_percentage out NOCOPY number,
13 x_rate_source_id out NOCOPY number)
14 is
15 l_amount NUMBER(22,5);
16 l_bill_rate_flag VARCHAR2(1);
17 l_status NUMBER;
18 l_bill_trans_currency_code VARCHAR2(30);
19 l_bill_txn_bill_rate NUMBER;
20 l_markup_percentage NUMBER;
21 l_rate_source_id NUMBER;
22 begin
23 -- Reset the output parameters.
24 x_amount := NULL;
25 x_bill_rate_flag := NULL;
26 x_status := 0;
27 /*1673818 Comment modified from x_bill_rate_flag to 'Y' to x_bill_rate_flag to 'B' */
28 -- Add your calculation of bill amount here.
29 -- Assign the result of bill amount to x_amount
30 -- If you want a bill rate populated by Project Accounting, set
31 -- x_bill_rate_flag to 'B' return rate in the x_bill_txn_bill_rate and if you are using markup, return
32 -- markup percentage in the x_markup_percentage and populate the x_rate_source_id with unique identifier
33 -- of the source that was used to derive the bill rate or markup. If x_bill_rate_flag's null or
34 -- set to 'N', x_amount will be treated as a markup, and bill rate will not be populated.
35 -- Do not add 'commit' or 'rollback' in your code, since Oracle
36 -- Project Accounting controls the transaction for you.
37 -- Added transaction type parameter possible values are 'ACTUAL','FORECAST' so do your calculation accordingly
38 exception
39 when others then
40 -- Add your exception handler here.
41 -- To raise an application error, assign a positive number to x_status.
42 -- To raise an ORACLE error, assign SQLCODE to x_status.
43 --Null out all the IN OUT and OUT parameters.
44 null;
45
46 end Calc_Bill_Amount;
47
48
49 end PA_Client_Extn_Billing;