DBA Data[Home] [Help]

PACKAGE: APPS.IBY_AR_UTILS

Source


1 PACKAGE IBY_AR_UTILS AUTHID CURRENT_USER AS
2 /* $Header: ibyaruts.pls 120.7.12020000.2 2012/11/20 11:35:32 dhati 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   p_source_view     IN VARCHAR2
45  )
46  RETURN XMLType;
47 
48  --
49  -- Overloaded form of the earlier API.This restricts the Invoice details
50  -- based on the instrument type. The earlier function has been kept
51  --  for backward compatibility.
52  -- NOTE
56  -- Bug # 8713025
53  --   For performance reasons this function returns a concatenation
54  --   of DocumentReceivable and DocumentReceivableCount
55  --
57  -- Added input parameter p_process_profile : process profile code of the transaction.
58  --
59  FUNCTION get_document_receivable
60  (
61  p_extension_id    IN iby_trxn_summaries_all.initiator_extension_id%TYPE,
62  p_trxntypeid      IN iby_trxn_summaries_all.trxntypeid%TYPE,
63  p_card_data_level IN iby_trxn_core.card_data_level%TYPE,
64  p_instrument_type IN iby_trxn_summaries_all.instrtype%TYPE,
65  p_process_profile IN iby_trxn_summaries_all.process_profile_code%TYPE,
66  p_source_view     IN VARCHAR2
67  )
68  RETURN XMLType;
69 
70 
71  -- Return: The Authorization Flag for the given Transaction Extension Id
72  PROCEDURE get_authorization_status
73  (p_trxn_extension_id  IN iby_fndcpt_tx_operations.trxn_extension_id%TYPE,
74  x_auth_flag   OUT NOCOPY VARCHAR2);
75 
76  PROCEDURE call_get_payment_info(
77                p_payment_server_order_num IN
78                               ar_cash_receipts.payment_server_order_num%TYPE,
79                x_customer_trx_id OUT
80                               ar_receivable_applications.customer_trx_id%TYPE,
81                x_return_status   OUT NOCOPY VARCHAR2,
82                x_msg_count       OUT NOCOPY NUMBER,
83                x_msg_data        OUT NOCOPY VARCHAR2
84                );
85 
86  --
87  -- Return: The customer trx id for the given order if, or NULL if none
88  --         is found
89  -- Notes: Inline function wrapper of the above procedure
90  --
91  FUNCTION call_get_payment_info
92  (p_payment_server_order_num IN
93    ar_cash_receipts.payment_server_order_num%TYPE)
94  RETURN ar_receivable_applications.customer_trx_id%TYPE;
95 
96  --
97  -- Return: The order-level (total) freight amount
98  --
99  FUNCTION get_order_freight_amount(p_customer_trx_id IN
100    ar_invoice_header_v.customer_trx_id%TYPE)
101  RETURN NUMBER;
102 
103  --
104  -- Args:   p_tax_type => The tax type; use one of the enumerated
105  --                       tax type constants from this package
106  -- Return: The order-level (total) tax amount
107  --
108  FUNCTION get_order_tax_amount
109   (p_customer_trx_id IN ar_invoice_header_v.customer_trx_id%TYPE,
110    p_tax_type        IN VARCHAR2)
111  RETURN NUMBER;
112 
113  FUNCTION get_order_amount
114   (p_customer_trx_id IN ar_invoice_header_v.customer_trx_id%TYPE)
115  RETURN NUMBER;
116 
117  FUNCTION get_line_tax_amount
118   (p_customer_trx_id IN ar_invoice_header_v.customer_trx_id%TYPE,
119    p_customer_trx_line_id IN ar_invoice_lines_v.customer_trx_line_id%TYPE,
120    p_tax_type             IN VARCHAR2)
121  RETURN NUMBER;
122 
123  FUNCTION get_line_tax_rate
124   (p_customer_trx_id IN ar_invoice_header_v.customer_trx_id%TYPE,
125    p_customer_trx_line_id IN ar_invoice_lines_v.customer_trx_line_id%TYPE,
126    p_tax_type             IN VARCHAR2)
127  RETURN NUMBER;
128 
129  --
130  --Return the receipt number
131  --
132  FUNCTION get_trxn_ref_number2
133   (p_trxn_extension_id IN iby_fndcpt_tx_extensions.trxn_extension_id%TYPE)
134  RETURN VARCHAR2;
135 
136 END IBY_AR_UTILS;