1 PACKAGE ARP_CASHBOOK AS
2 /*$Header: ARRECBKS.pls 120.2 2003/10/23 23:12:48 orashid ship $*/
3 --
4 -- Public procedures/functions
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 PROCEDURE clear(
29 p_cr_id IN ar_cash_receipts.cash_receipt_id%TYPE,
30 p_trx_date IN ar_cash_receipt_history.trx_date%TYPE,
31 p_gl_date IN ar_cash_receipt_history.gl_date%TYPE,
32 p_actual_value_date IN DATE,
33 p_exchange_date IN ar_cash_receipt_history.exchange_date%TYPE,
34 p_exchange_rate_type IN ar_cash_receipt_history.exchange_rate_type%TYPE,
35 p_exchange_rate IN ar_cash_receipt_history.exchange_rate%TYPE,
36 p_bank_currency IN ce_bank_accounts.currency_code%TYPE,
37 p_amount_cleared IN ar_cash_receipt_history.amount%TYPE,
38 p_amount_factored IN ar_cash_receipt_history.factor_discount_amount%TYPE,
39 p_module_name IN VARCHAR2,
40 p_module_version IN VARCHAR2,
41 p_crh_id OUT NOCOPY ar_cash_receipt_history.cash_receipt_history_id%TYPE );
42
43 PROCEDURE unclear(
44 p_cr_id IN ar_cash_receipts.cash_receipt_id%TYPE,
45 p_trx_date IN ar_cash_receipt_history.trx_date%TYPE,
46 p_gl_date IN ar_cash_receipt_history.gl_date%TYPE,
47 p_actual_value_date IN ar_cash_receipts.actual_value_date%TYPE,
48 p_module_name IN VARCHAR2,
49 p_module_version IN VARCHAR2,
50 p_crh_id OUT NOCOPY ar_cash_receipt_history.cash_receipt_history_id%TYPE );
51
52 PROCEDURE risk_eliminate(
53 p_cr_id IN ar_cash_receipts.cash_receipt_id%TYPE,
54 p_trx_date IN ar_cash_receipt_history.trx_date%TYPE,
55 p_gl_date IN ar_cash_receipt_history.gl_date%TYPE,
56 p_module_name IN VARCHAR2,
57 p_module_version IN VARCHAR2,
58 p_crh_id OUT NOCOPY ar_cash_receipt_history.cash_receipt_history_id%TYPE );
59
60 PROCEDURE undo_risk_eliminate(
61 p_cr_id IN ar_cash_receipts.cash_receipt_id%TYPE,
62 p_trx_date IN ar_cash_receipt_history.trx_date%TYPE,
63 p_gl_date IN ar_cash_receipt_history.gl_date%TYPE,
64 p_module_name IN VARCHAR2,
65 p_module_version IN VARCHAR2,
66 p_crh_id OUT NOCOPY ar_cash_receipt_history.cash_receipt_history_id%TYPE );
67
68 PROCEDURE ins_misc_txn(
69 p_receipt_number IN ar_cash_receipts.receipt_number%TYPE,
70 p_document_number IN ar_cash_receipts.doc_sequence_value%TYPE,
71 p_doc_sequence_id IN ar_cash_receipts.doc_sequence_id%TYPE,
72 p_gl_date IN ar_cash_receipt_history.gl_date%TYPE,
73 p_receipt_date IN ar_cash_receipts.receipt_date%TYPE,
74 p_deposit_date IN ar_cash_receipts.deposit_date%TYPE,
75 p_receipt_amount IN ar_cash_receipts.amount%TYPE,
76 p_currency_code IN ar_cash_receipts.currency_code%TYPE,
77 p_exchange_date IN ar_cash_receipt_history.exchange_date%TYPE,
78 p_exchange_rate_type IN ar_cash_receipt_history.exchange_rate_type%TYPE,
79 p_exchange_rate IN ar_cash_receipt_history.exchange_rate%TYPE,
80 p_receipt_method_id IN ar_cash_receipts.receipt_method_id%TYPE,
81 p_remit_bank_account_id IN ar_cash_receipts.remit_bank_acct_use_id%TYPE,
82 p_receivables_trx_id IN ar_cash_receipts.receivables_trx_id%TYPE,
83 p_comments IN ar_cash_receipts.comments%TYPE,
84 p_vat_tax_id IN ar_cash_receipts.vat_tax_id%TYPE,
85 p_reference_type IN ar_cash_receipts.reference_type%TYPE,
86 p_reference_id IN ar_cash_receipts.reference_id%TYPE,
87 p_misc_payment_source IN ar_cash_receipts.misc_payment_source%TYPE,
88 p_anticipated_clearing_date IN ar_cash_receipts.anticipated_clearing_date%TYPE,
89 p_module_name IN VARCHAR2,
90 p_module_version IN VARCHAR2,
91 p_cr_id OUT NOCOPY ar_cash_receipts.cash_receipt_id%TYPE,
92 p_tax_rate IN NUMBER );
93
94 PROCEDURE reverse(
95 p_cr_id IN ar_cash_receipts.cash_receipt_id%TYPE,
96 p_reversal_gl_date IN ar_cash_receipt_history.reversal_gl_date%TYPE,
97 p_reversal_date IN ar_cash_receipts.reversal_date%TYPE,
98 p_reversal_comments IN ar_cash_receipts.reversal_comments%TYPE,
99 p_reversal_reason_code IN ar_cash_receipts.reversal_reason_code%TYPE,
100 p_reversal_category IN ar_cash_receipts.reversal_category%TYPE,
101 p_module_name IN VARCHAR2,
102 p_module_version IN VARCHAR2,
103 p_crh_id OUT NOCOPY ar_cash_receipt_history.cash_receipt_history_id%TYPE);
104
105 PROCEDURE debit_memo_reversal(
106 p_cash_receipt_id IN ar_cash_receipts.cash_receipt_id%TYPE,
107 p_cc_id IN ra_cust_trx_line_gl_dist.code_combination_id%TYPE,
108 p_dm_cust_trx_type_id IN ra_cust_trx_types.cust_trx_type_id%TYPE,
109 p_dm_cust_trx_type IN ra_cust_trx_types.name%TYPE,
110 p_reversal_gl_date IN ar_cash_receipt_history.reversal_gl_date%TYPE,
111 p_reversal_date IN ar_cash_receipts.reversal_date%TYPE,
112 p_reversal_category IN ar_cash_receipts.reversal_category%TYPE,
113 p_reversal_reason_code IN ar_cash_receipts.reversal_reason_code%TYPE,
114 p_reversal_comments IN ar_cash_receipts.reversal_comments%TYPE,
115 p_dm_number OUT NOCOPY ar_payment_schedules.trx_number%TYPE,
116 p_dm_doc_sequence_value IN ra_customer_trx.doc_sequence_value%TYPE,
117 p_dm_doc_sequence_id IN ra_customer_trx.doc_sequence_id%TYPE,
118 p_tw_status IN OUT NOCOPY VARCHAR2,
119 p_module_name IN VARCHAR2,
120 p_module_version IN VARCHAR2);
121
122 PROCEDURE Lock_Row(
123 P_BATCH_ID IN ar_batches.batch_id%TYPE,
124 P_AMOUNT IN ar_cash_receipt_history.amount%TYPE,
125 P_ACCTD_AMOUNT IN ar_cash_receipt_history.acctd_amount%TYPE,
126 P_NAME IN ar_batches.name%TYPE,
127 P_BATCH_DATE IN ar_batches.batch_date%TYPE,
128 P_GL_DATE IN ar_batches.gl_date%TYPE,
129 P_STATUS IN ar_batches.status%TYPE,
130 P_DEPOSIT_DATE IN ar_batches.deposit_date%TYPE,
131 P_CLOSED_DATE IN ar_batches.closed_date%TYPE,
132 P_TYPE IN ar_batches.type%TYPE,
133 P_BATCH_SOURCE_ID IN ar_batches.batch_source_id%TYPE,
134 P_CONTROL_COUNT IN ar_batches.control_count%TYPE,
135 P_CONTROL_AMOUNT IN ar_batches.control_amount%TYPE,
136 P_BATCH_APPLIED_STATUS IN ar_batches.batch_applied_status%TYPE,
137 P_CURRENCY_CODE IN ar_batches.currency_code%TYPE,
138 P_EXCHANGE_RATE_TYPE IN ar_batches.exchange_rate_type%TYPE,
139 P_EXCHANGE_DATE IN ar_batches.exchange_date%TYPE,
140 P_EXCHANGE_RATE IN ar_batches.exchange_rate%TYPE,
141 P_TRANSMISSION_REQUEST_ID IN ar_batches.transmission_request_id%TYPE,
142 P_LOCKBOX_ID IN ar_batches.lockbox_id%TYPE,
143 P_LOCKBOX_BATCH_NAME IN ar_batches.lockbox_batch_name%TYPE,
144 P_COMMENTS IN ar_batches.comments%TYPE,
145 P_ATTRIBUTE_CATEGORY IN ar_batches.attribute_category%TYPE,
146 P_ATTRIBUTE1 IN ar_batches.attribute1%TYPE,
147 P_ATTRIBUTE2 IN ar_batches.attribute2%TYPE,
148 P_ATTRIBUTE3 IN ar_batches.attribute3%TYPE,
149 P_ATTRIBUTE4 IN ar_batches.attribute4%TYPE,
150 P_ATTRIBUTE5 IN ar_batches.attribute5%TYPE,
151 P_ATTRIBUTE6 IN ar_batches.attribute6%TYPE,
152 P_ATTRIBUTE7 IN ar_batches.attribute7%TYPE,
153 P_ATTRIBUTE8 IN ar_batches.attribute8%TYPE,
154 P_ATTRIBUTE9 IN ar_batches.attribute9%TYPE,
155 P_ATTRIBUTE10 IN ar_batches.attribute10%TYPE,
156 P_MEDIA_REFERENCE IN ar_batches.media_reference%TYPE,
157 P_OPERATION_REQUEST_ID IN ar_batches.operation_request_id%TYPE,
158 P_RECEIPT_METHOD_ID IN ar_batches.receipt_method_id%TYPE,
159 P_REMITTANCE_BANK_ACCOUNT_ID IN ar_batches.remit_bank_acct_use_id%TYPE,
160 P_RECEIPT_CLASS_ID IN ar_batches.receipt_class_id%TYPE,
161 P_ATTRIBUTE11 IN ar_batches.attribute11%TYPE,
162 P_ATTRIBUTE12 IN ar_batches.attribute12%TYPE,
163 P_ATTRIBUTE13 IN ar_batches.attribute13%TYPE,
164 P_ATTRIBUTE14 IN ar_batches.attribute14%TYPE,
165 P_ATTRIBUTE15 IN ar_batches.attribute15%TYPE,
166 P_PROGRAM_APPLICATION_ID IN ar_batches.program_application_id%TYPE,
167 P_PROGRAM_ID IN ar_batches.program_id%TYPE,
168 P_PROGRAM_UPDATE_DATE IN ar_batches.program_update_date%TYPE,
169 P_REMITTANCE_BANK_BRANCH_ID IN ar_batches.remittance_bank_branch_id%TYPE,
170 P_REMIT_METHOD_CODE IN ar_batches.remit_method_code%TYPE,
171 P_REQUEST_ID IN ar_batches.request_id%TYPE,
172 P_SET_OF_BOOKS_ID IN ar_batches.set_of_books_id%TYPE,
173 P_TRANSMISSION_ID IN ar_batches.transmission_id%TYPE,
174 P_BANK_DEPOSIT_NUMBER IN ar_batches.bank_deposit_number%TYPE
175 );
176
177 FUNCTION receipt_debit_memo_reversed( p_cash_receipt_id IN NUMBER)
178 RETURN VARCHAR2;
179
180
181
182 PROCEDURE update_actual_value_date(p_cash_receipt_id IN NUMBER,
183 p_actual_value_date IN DATE);
184
185 FUNCTION revision RETURN VARCHAR2;
186
187 --
188 END ARP_CASHBOOK;