4 -- Public procedures/functions
1 PACKAGE ARP_CASHBOOK AUTHID CURRENT_USER AS
2 /*$Header: ARRECBKS.pls 120.2.12020000.6 2013/02/20 18:21:48 rravikir ship $*/
3 --
5 --
6 /*----------------------------------
7 Some notes to use this clear procedure:
8
9 1. The p_amount_cleared and p_amount_factored to be passed in
10 should be in the bank currency.
11
12 2. If p_bank_currency <> the currency of the receipt, this
13 means the p_bank_currency must be the functional currency,
14 In this case, it assumes the following has been
15 validated before calling this procedure:
16
17 p_amount_cleared+p_amount_factored =
18 p_exchange_rate * ar_cash_receipts.amount
19
20 3. If p_bank_currency = the currency of the receipt,
21 In this case, it assumes the following has been validated
22 before calling this procedure:
23
24 p_amount_cleared+p_amount_factored =
25 ar_cash_receipts.amount
26
27 ------------------------------------*/
28
29 --bug14553712, created these attributes for clearing the PERF issue
30 g_customer_id_tab ar_bus_event_sub_pvt.generic_id_type;
31 g_site_use_id_tab ar_bus_event_sub_pvt.generic_id_type;
32 g_currency_tab ar_bus_event_sub_pvt.currency_type;
33 g_org_id_tab ar_bus_event_sub_pvt.generic_id_type;
34
35
36 type unq_cust_site_cur_org_cmb is table of varchar2(1000) index by varchar2(1000);
37 g_unq_cust_site_cur_org_cmb unq_cust_site_cur_org_cmb;
38
39
40
41 PROCEDURE clear(
42 p_cr_id IN ar_cash_receipts.cash_receipt_id%TYPE,
43 p_trx_date IN ar_cash_receipt_history.trx_date%TYPE,
44 p_gl_date IN ar_cash_receipt_history.gl_date%TYPE,
45 p_actual_value_date IN DATE,
46 p_exchange_date IN ar_cash_receipt_history.exchange_date%TYPE,
47 p_exchange_rate_type IN ar_cash_receipt_history.exchange_rate_type%TYPE,
48 p_exchange_rate IN ar_cash_receipt_history.exchange_rate%TYPE,
49 p_bank_currency IN ce_bank_accounts.currency_code%TYPE,
50 p_amount_cleared IN ar_cash_receipt_history.amount%TYPE,
51 p_amount_factored IN ar_cash_receipt_history.factor_discount_amount%TYPE,
52 p_module_name IN VARCHAR2,
53 p_module_version IN VARCHAR2,
54 p_crh_id OUT NOCOPY ar_cash_receipt_history.cash_receipt_history_id%TYPE );
55
56 PROCEDURE unclear(
57 p_cr_id IN ar_cash_receipts.cash_receipt_id%TYPE,
58 p_trx_date IN ar_cash_receipt_history.trx_date%TYPE,
59 p_gl_date IN ar_cash_receipt_history.gl_date%TYPE,
60 p_actual_value_date IN ar_cash_receipts.actual_value_date%TYPE,
61 p_module_name IN VARCHAR2,
62 p_module_version IN VARCHAR2,
63 p_crh_id OUT NOCOPY ar_cash_receipt_history.cash_receipt_history_id%TYPE );
64
65 PROCEDURE risk_eliminate(
66 p_cr_id IN ar_cash_receipts.cash_receipt_id%TYPE,
67 p_trx_date IN ar_cash_receipt_history.trx_date%TYPE,
68 p_gl_date IN ar_cash_receipt_history.gl_date%TYPE,
69 p_module_name IN VARCHAR2,
70 p_module_version IN VARCHAR2,
71 p_crh_id OUT NOCOPY ar_cash_receipt_history.cash_receipt_history_id%TYPE );
72
73 PROCEDURE undo_risk_eliminate(
74 p_cr_id IN ar_cash_receipts.cash_receipt_id%TYPE,
75 p_trx_date IN ar_cash_receipt_history.trx_date%TYPE,
76 p_gl_date IN ar_cash_receipt_history.gl_date%TYPE,
77 p_module_name IN VARCHAR2,
78 p_module_version IN VARCHAR2,
79 p_crh_id OUT NOCOPY ar_cash_receipt_history.cash_receipt_history_id%TYPE );
80
81 PROCEDURE ins_misc_txn(
82 p_receipt_number IN ar_cash_receipts.receipt_number%TYPE,
83 p_document_number IN ar_cash_receipts.doc_sequence_value%TYPE,
84 p_doc_sequence_id IN ar_cash_receipts.doc_sequence_id%TYPE,
85 p_gl_date IN ar_cash_receipt_history.gl_date%TYPE,
86 p_receipt_date IN ar_cash_receipts.receipt_date%TYPE,
87 p_deposit_date IN ar_cash_receipts.deposit_date%TYPE,
88 p_receipt_amount IN ar_cash_receipts.amount%TYPE,
89 p_currency_code IN ar_cash_receipts.currency_code%TYPE,
90 p_exchange_date IN ar_cash_receipt_history.exchange_date%TYPE,
91 p_exchange_rate_type IN ar_cash_receipt_history.exchange_rate_type%TYPE,
92 p_exchange_rate IN ar_cash_receipt_history.exchange_rate%TYPE,
93 p_receipt_method_id IN ar_cash_receipts.receipt_method_id%TYPE,
94 p_remit_bank_account_id IN ar_cash_receipts.remit_bank_acct_use_id%TYPE,
95 p_receivables_trx_id IN ar_cash_receipts.receivables_trx_id%TYPE,
96 p_comments IN ar_cash_receipts.comments%TYPE,
97 p_vat_tax_id IN ar_cash_receipts.vat_tax_id%TYPE,
98 p_reference_type IN ar_cash_receipts.reference_type%TYPE,
99 p_reference_id IN ar_cash_receipts.reference_id%TYPE,
100 p_misc_payment_source IN ar_cash_receipts.misc_payment_source%TYPE,
101 p_anticipated_clearing_date IN ar_cash_receipts.anticipated_clearing_date%TYPE,
102 p_module_name IN VARCHAR2,
103 p_module_version IN VARCHAR2,
104 p_cr_id OUT NOCOPY ar_cash_receipts.cash_receipt_id%TYPE,
105 p_tax_rate IN NUMBER );
106
107 PROCEDURE reverse(
108 p_cr_id IN ar_cash_receipts.cash_receipt_id%TYPE,
109 p_reversal_gl_date IN ar_cash_receipt_history.reversal_gl_date%TYPE,
110 p_reversal_date IN ar_cash_receipts.reversal_date%TYPE,
111 p_reversal_comments IN ar_cash_receipts.reversal_comments%TYPE,
112 p_reversal_reason_code IN ar_cash_receipts.reversal_reason_code%TYPE,
113 p_reversal_category IN ar_cash_receipts.reversal_category%TYPE,
114 p_module_name IN VARCHAR2,
115 p_module_version IN VARCHAR2,
116 p_crh_id OUT NOCOPY ar_cash_receipt_history.cash_receipt_history_id%TYPE);
117
118 PROCEDURE debit_memo_reversal(
119 p_cash_receipt_id IN ar_cash_receipts.cash_receipt_id%TYPE,
120 p_cc_id IN ra_cust_trx_line_gl_dist.code_combination_id%TYPE,
121 p_dm_cust_trx_type_id IN ra_cust_trx_types.cust_trx_type_id%TYPE,
122 p_dm_cust_trx_type IN ra_cust_trx_types.name%TYPE,
123 p_reversal_gl_date IN ar_cash_receipt_history.reversal_gl_date%TYPE,
124 p_reversal_date IN ar_cash_receipts.reversal_date%TYPE,
125 p_reversal_category IN ar_cash_receipts.reversal_category%TYPE,
126 p_reversal_reason_code IN ar_cash_receipts.reversal_reason_code%TYPE,
127 p_reversal_comments IN ar_cash_receipts.reversal_comments%TYPE,
128 p_dm_number OUT NOCOPY ar_payment_schedules.trx_number%TYPE,
129 p_dm_doc_sequence_value IN ra_customer_trx.doc_sequence_value%TYPE,
130 p_dm_doc_sequence_id IN ra_customer_trx.doc_sequence_id%TYPE,
131 p_tw_status IN OUT NOCOPY VARCHAR2,
132 p_module_name IN VARCHAR2,
133 p_module_version IN VARCHAR2);
134
135 PROCEDURE Lock_Row(
136 P_BATCH_ID IN ar_batches.batch_id%TYPE,
137 P_AMOUNT IN ar_cash_receipt_history.amount%TYPE,
138 P_ACCTD_AMOUNT IN ar_cash_receipt_history.acctd_amount%TYPE,
139 P_NAME IN ar_batches.name%TYPE,
140 P_BATCH_DATE IN ar_batches.batch_date%TYPE,
141 P_GL_DATE IN ar_batches.gl_date%TYPE,
142 P_STATUS IN ar_batches.status%TYPE,
143 P_DEPOSIT_DATE IN ar_batches.deposit_date%TYPE,
144 P_CLOSED_DATE IN ar_batches.closed_date%TYPE,
145 P_TYPE IN ar_batches.type%TYPE,
146 P_BATCH_SOURCE_ID IN ar_batches.batch_source_id%TYPE,
147 P_CONTROL_COUNT IN ar_batches.control_count%TYPE,
148 P_CONTROL_AMOUNT IN ar_batches.control_amount%TYPE,
149 P_BATCH_APPLIED_STATUS IN ar_batches.batch_applied_status%TYPE,
150 P_CURRENCY_CODE IN ar_batches.currency_code%TYPE,
151 P_EXCHANGE_RATE_TYPE IN ar_batches.exchange_rate_type%TYPE,
152 P_EXCHANGE_DATE IN ar_batches.exchange_date%TYPE,
153 P_EXCHANGE_RATE IN ar_batches.exchange_rate%TYPE,
154 P_TRANSMISSION_REQUEST_ID IN ar_batches.transmission_request_id%TYPE,
155 P_LOCKBOX_ID IN ar_batches.lockbox_id%TYPE,
156 P_LOCKBOX_BATCH_NAME IN ar_batches.lockbox_batch_name%TYPE,
157 P_COMMENTS IN ar_batches.comments%TYPE,
158 P_ATTRIBUTE_CATEGORY IN ar_batches.attribute_category%TYPE,
159 P_ATTRIBUTE1 IN ar_batches.attribute1%TYPE,
160 P_ATTRIBUTE2 IN ar_batches.attribute2%TYPE,
161 P_ATTRIBUTE3 IN ar_batches.attribute3%TYPE,
162 P_ATTRIBUTE4 IN ar_batches.attribute4%TYPE,
163 P_ATTRIBUTE5 IN ar_batches.attribute5%TYPE,
164 P_ATTRIBUTE6 IN ar_batches.attribute6%TYPE,
165 P_ATTRIBUTE7 IN ar_batches.attribute7%TYPE,
166 P_ATTRIBUTE8 IN ar_batches.attribute8%TYPE,
167 P_ATTRIBUTE9 IN ar_batches.attribute9%TYPE,
168 P_ATTRIBUTE10 IN ar_batches.attribute10%TYPE,
169 P_MEDIA_REFERENCE IN ar_batches.media_reference%TYPE,
170 P_OPERATION_REQUEST_ID IN ar_batches.operation_request_id%TYPE,
171 P_RECEIPT_METHOD_ID IN ar_batches.receipt_method_id%TYPE,
172 P_REMITTANCE_BANK_ACCOUNT_ID IN ar_batches.remit_bank_acct_use_id%TYPE,
173 P_RECEIPT_CLASS_ID IN ar_batches.receipt_class_id%TYPE,
174 P_ATTRIBUTE11 IN ar_batches.attribute11%TYPE,
175 P_ATTRIBUTE12 IN ar_batches.attribute12%TYPE,
176 P_ATTRIBUTE13 IN ar_batches.attribute13%TYPE,
177 P_ATTRIBUTE14 IN ar_batches.attribute14%TYPE,
178 P_ATTRIBUTE15 IN ar_batches.attribute15%TYPE,
179 P_PROGRAM_APPLICATION_ID IN ar_batches.program_application_id%TYPE,
180 P_PROGRAM_ID IN ar_batches.program_id%TYPE,
181 P_PROGRAM_UPDATE_DATE IN ar_batches.program_update_date%TYPE,
182 P_REMITTANCE_BANK_BRANCH_ID IN ar_batches.remittance_bank_branch_id%TYPE,
183 P_REMIT_METHOD_CODE IN ar_batches.remit_method_code%TYPE,
184 P_REQUEST_ID IN ar_batches.request_id%TYPE,
185 P_SET_OF_BOOKS_ID IN ar_batches.set_of_books_id%TYPE,
186 P_TRANSMISSION_ID IN ar_batches.transmission_id%TYPE,
187 P_BANK_DEPOSIT_NUMBER IN ar_batches.bank_deposit_number%TYPE
188 );
189
190 FUNCTION receipt_debit_memo_reversed( p_cash_receipt_id IN NUMBER)
194
191 RETURN VARCHAR2;
192
193
195 PROCEDURE update_actual_value_date(p_cash_receipt_id IN NUMBER,
196 p_actual_value_date IN DATE);
197
198 PROCEDURE refresh_risk_value; -- Added for bug 16229574
199
200 FUNCTION revision RETURN VARCHAR2;
201
202 --
203 END ARP_CASHBOOK;