1 PACKAGE IBY_AR_UTILS AS
2 /* $Header: ibyaruts.pls 120.3.12010000.3 2008/11/13 14:13:19 lmallick ship $ */
3
4
5 -- Sales tax type
6 G_TAX_TYPE_SALES CONSTANT VARCHAR2(30) := 'SALESTAX';
7 -- VAT tax type
8 G_TAX_TYPE_VAT CONSTANT VARCHAR2(30) := 'VAT';
9
10 --
11 -- This FUNCTION is obsolete in R12.
12 -- The overloaded "extension-based" function is used instead.
13 --
14 -- Return: The document receivable for the given transaction
15 -- Notes: Function is used to "short-circuit" joins to the documents
16 -- receivable XML extract view so that transactions which do not
17 -- need this sub-element (e.g. online authorizations) do not suffer
18 -- unacceptable performance costs
19 --
20 FUNCTION get_document_receivable
21 (p_tangibleid IN iby_trxn_summaries_all.tangibleid%TYPE,
22 p_trxntypeid IN iby_trxn_summaries_all.trxntypeid%TYPE,
23 p_card_data_level IN iby_trxn_core.card_data_level%TYPE,
24 p_instrument_type IN iby_trxn_summaries_all.instrtype%TYPE
25 )
26 RETURN XMLType;
27
28 --
29 -- Overloaded form of the earlier API. This is transaction extension
30 -- driven. This function would be used in R12. the previous one has
31 -- been obsoleted.
32 --
33 -- Return: The document receivable for the given transaction
34 -- Notes: Function is used to "short-circuit" joins to the documents
35 -- receivable XML extract view so that transactions which do not
36 -- need this sub-element (e.g. online authorizations) do not suffer
37 -- unacceptable performance costs
38 --
39 FUNCTION get_document_receivable
40 (p_extension_id IN iby_trxn_summaries_all.initiator_extension_id%TYPE,
41 p_trxntypeid IN iby_trxn_summaries_all.trxntypeid%TYPE,
42 p_card_data_level IN iby_trxn_core.card_data_level%TYPE,
43 p_instrument_type IN iby_trxn_summaries_all.instrtype%TYPE
44 )
45 RETURN XMLType;
46
47
48 -- Return: The Authorization Flag for the given Transaction Extension Id
49 PROCEDURE get_authorization_status
50 (p_trxn_extension_id IN iby_fndcpt_tx_operations.trxn_extension_id%TYPE,
51 x_auth_flag OUT NOCOPY VARCHAR2);
52
53 PROCEDURE call_get_payment_info(
54 p_payment_server_order_num IN
55 ar_cash_receipts.payment_server_order_num%TYPE,
56 x_customer_trx_id OUT
57 ar_receivable_applications.customer_trx_id%TYPE,
58 x_return_status OUT NOCOPY VARCHAR2,
59 x_msg_count OUT NOCOPY NUMBER,
60 x_msg_data OUT NOCOPY VARCHAR2
61 );
62
63 --
64 -- Return: The customer trx id for the given order if, or NULL if none
65 -- is found
66 -- Notes: Inline function wrapper of the above procedure
67 --
68 FUNCTION call_get_payment_info
69 (p_payment_server_order_num IN
70 ar_cash_receipts.payment_server_order_num%TYPE)
71 RETURN ar_receivable_applications.customer_trx_id%TYPE;
72
73 --
74 -- Return: The order-level (total) freight amount
75 --
76 FUNCTION get_order_freight_amount(p_customer_trx_id IN
77 ar_invoice_header_v.customer_trx_id%TYPE)
78 RETURN NUMBER;
79
80 --
81 -- Args: p_tax_type => The tax type; use one of the enumerated
82 -- tax type constants from this package
83 -- Return: The order-level (total) tax amount
84 --
85 FUNCTION get_order_tax_amount
86 (p_customer_trx_id IN ar_invoice_header_v.customer_trx_id%TYPE,
87 p_tax_type IN VARCHAR2)
88 RETURN NUMBER;
89
90 FUNCTION get_order_amount
91 (p_customer_trx_id IN ar_invoice_header_v.customer_trx_id%TYPE)
92 RETURN NUMBER;
93
94 FUNCTION get_line_tax_amount
95 (p_customer_trx_id IN ar_invoice_header_v.customer_trx_id%TYPE,
96 p_customer_trx_line_id IN ar_invoice_lines_v.customer_trx_line_id%TYPE,
97 p_tax_type IN VARCHAR2)
98 RETURN NUMBER;
99
100 FUNCTION get_line_tax_rate
101 (p_customer_trx_id IN ar_invoice_header_v.customer_trx_id%TYPE,
102 p_customer_trx_line_id IN ar_invoice_lines_v.customer_trx_line_id%TYPE,
103 p_tax_type IN VARCHAR2)
104 RETURN NUMBER;
105
106 END IBY_AR_UTILS;