1 package body MTL_INTERCOMPANY_INVOICES as
2 /* $Header: INVICIVB.pls 120.2 2006/03/29 05:41:10 sbitra noship $ */
3
4 function get_transfer_price (I_transaction_id in number,
5 I_price_list_id in number,
6 I_sell_ou_id in number,
7 I_ship_ou_id in number,
8 O_currency_code out NOCOPY varchar2,
9 x_return_status OUT NOCOPY VARCHAR2,
10 x_msg_count OUT NOCOPY NUMBER,
11 x_msg_data OUT NOCOPY VARCHAR2,
12 I_order_line_id IN NUMBER default null)
13 return number
14 is
15 --Bug 5118727 Added new parameter I_order_line_id to get_transfer_price
16
17 -- This function can be replaced by custom code to establish the
18 -- transfer price used in intercompany invoicing. When this
19 -- function returns NULL, the transfer pricing algorithm in the base
20 -- application code will be used to establish the transfer price.
21 --
22 -- Otherwise, the returned number coupled with the returned currency
23 -- in O_currency_code will be used as the transfer price.
24
25 begin
26 O_currency_code := null;
27 x_return_status := FND_API.G_RET_STS_SUCCESS;
28 x_msg_count := 0;
29 x_msg_data := null;
30
31 return(NULL);
32
33 exception
34 when others then
35 raise;
36 end get_transfer_price;
37
38 procedure callback (I_event in varchar2,
39 I_transaction_id in number,
40 I_report_header_id in number,
41 I_customer_trx_line_id in number)
42 is
43
44 -- This procedure defines various callbacks in the intercompany
45 -- invoicing programs which can be replaced with custom code to
46 -- provide addition and modification to the existing invoice creation
47 -- logic.
48 --
49 -- Valid events are:
50 --
51 -- RA_INTERFACE_LINES -
52 -- after an insert into RA_INTERFACE_LINES in the AR invoice
53 -- creation program. The transaction_id can be used to identify
54 -- the row in RA_INTERFACE_LINES using the transaction flex column
55 -- INTERFACE_LINE_ATTRIBUTE7.
56 --
57 -- AP_EXPENSE_REPORT_HEADERS -
58 -- after the insert into AP_EXPENSE_REPORT_HEADERS in the AP
59 -- invoice creation program. The report_header_id should be used
60 -- to identify the row inserted.
61 --
62 -- AP_EXPENSE_REPORT_LINES -
63 -- after the insert into AP_EXPENSE_REPORT_LINES in the AP invoice
64 -- creation program. The report_header_id along with
65 -- customer_trx_line_id, which is mapped to reference_1 column,
66 -- should be used to identify the row.
67
68 begin
69 if (I_event = 'RA_INTERFACE_LINES') then
70 null;
71 elsif (I_event = 'AP_EXPENSE_REPORT_HEADERS') then
72 null;
73 elsif (I_event = 'AP_EXPENSE_REPORT_LINES') then
74 null;
75 end if;
76
77 exception
78 when others then
79 raise;
80 end callback;
81
82 end MTL_INTERCOMPANY_INVOICES;