DBA Data[Home] [Help]

PACKAGE BODY: APPS.AR_MRC_ENGINE3

Source


1 PACKAGE BODY AR_MRC_ENGINE3 AS
2 /* $Header: ARMCEN3B.pls 120.2 2005/04/14 22:40:29 hyu noship $ */
3 
4 /*=============================================================================
5  |   Public Functions / Procedures
6  *============================================================================*/
7 
8 /*=============================================================================
9  |  PUBLIC PROCEDURE  Insert_ra_rec_cash
10  |
11  |  DESCRIPTION:
12  |                This procedure will be called from ARP_PROC_RCT_UTIL
13  |                to process the mrc data for insert.
14  |
15  |  CALLS PROCEDURES / FUNCTIONS (local to this package body)
16  |
17  |  PARAMETERS
18  |      p_rec_app_id            IN NUMBER,
19  |      p_rec_app_record        IN ar_receivable_applications%ROWTYPE
20  |      p_cash_receipt_id       IN ar_cash_receipts.cash_receipt_id%TYPE
21  |      p_amount                IN ar_cash_receipts.amount%TYPE
22  |      p_payment_schedule_id   IN ar_payment_schedules.payment_schedule_id%TYPE
23  |
24  |  KNOWN ISSUES:
25  |
26  |  NOTES:
27  |
28  |  MODIFICATION HISTORY
29  |  Date        Author                  Description of Change
30  |  09/03/02    Debbie Sue Jancis  	Created
31  *============================================================================*/
32 PG_DEBUG varchar2(1) := NVL(FND_PROFILE.value('AFLOG_ENABLED'), 'N');
33 
34 PROCEDURE insert_ra_rec_cash(
35         p_rec_app_id            IN NUMBER,
36         p_rec_app_record        IN ar_receivable_applications%ROWTYPE,
37         p_cash_receipt_id       IN ar_cash_receipts.cash_receipt_id%TYPE,
38         p_amount                IN ar_cash_receipts.amount%TYPE,
39         p_payment_schedule_id   IN ar_payment_schedules.payment_schedule_id%TYPE
40                         ) IS
41 BEGIN
42 NULL;
43 --   IF PG_DEBUG in ('Y', 'C') THEN
44 --      arp_standard.debug( 'AR_MRC_ENGINE3.insert_ra_rec_cash(+)');
45 --   END IF;
46 
47    /*-----------------------------------------------------------------+
48     |  Dump the input parameters for debugging purposes               |
49     +-----------------------------------------------------------------*/
50 
51 --   IF PG_DEBUG in ('Y', 'C') THEN
52 --      arp_standard.debug('insert_ra_rec_cash: ' || ' p_rec_app_id        : ' || to_char(p_rec_app_id));
53 --      arp_standard.debug('insert_ra_rec_cash: ' || ' cash Receipt id     : ' || to_char(p_cash_receipt_id));
54 --      arp_standard.debug('insert_ra_rec_cash: ' || ' Amount              : ' || to_char(p_amount));
55 --      arp_standard.debug('insert_ra_rec_cash: ' || ' payment schedule id : ' || to_char(p_payment_schedule_id));
56 --   END IF;
57 
58    /*-----------------------------------------------------------------+
59     |  First we need to check if MRC is enabled.  If it is than we    |
60     |  continue processing.  If it is not then we are finished.       |
61     +-----------------------------------------------------------------*/
62 --   IF PG_DEBUG in ('Y', 'C') THEN
63 --      arp_standard.debug('insert_ra_rec_cash: ' || 'before checking to see if mrc is enabled..');
64 --   END IF;
65 --   IF (gl_ca_utility_pkg.mrc_enabled(
66 --                    p_sob_id => ar_mc_info.primary_sob_id,
67 --                    p_org_id => ar_mc_info.org_id,
68 --                    p_appl_id => 222
69 --                          ))  THEN
70 
71 --        IF PG_DEBUG in ('Y', 'C') THEN
72 --           arp_standard.debug('insert_ra_rec_cash: ' || 'MRC is enabled...     ');
73 --        END IF;
74 
75 --           BEGIN
76 --                ar_mc_rec_apps_pkg.insert_ra_rec_cash(
77 --                              p_rec_app_id          => p_rec_app_id,
78 --                              p_rec_app_record      => p_rec_app_record,
79 --                              p_cash_receipt_id     => p_cash_receipt_id,
80 --                              p_amount              => p_amount,
81 --                              p_payment_schedule_id => p_payment_schedule_id);
82 --           EXCEPTION
83 --            WHEN OTHERS THEN
84 --              IF PG_DEBUG in ('Y', 'C') THEN
85 --                 arp_standard.debug('insert_ra_rec_cash: ' || 'error during insert for AR_RECEIVABLES_APPS');
86 --              END IF;
87 --              APP_EXCEPTION.RAISE_EXCEPTION;
88 --           END;
89 
90 --    END IF;  /* end of mrc is enabled */
91 
92 --  IF PG_DEBUG in ('Y', 'C') THEN
93 --     arp_standard.debug( 'AR_MRC_ENGINE3.insert_ra_rec_cash(-)');
94 --  END IF;
95 
96 END insert_ra_rec_cash;
97 
98 /*=============================================================================
99  |  PUBLIC PROCEDURE  create_matching_unapp_records
100  |
101  |  DESCRIPTION:
102  |                This procedure will be called from ARP_CONFIRMATION
103  |                to process the mrc data for insert.
104  |
105  |  CALLS PROCEDURES / FUNCTIONS (local to this package body)
106  |
107  |  PARAMETERS
108  |      p_rec_app_id            IN NUMBER,
109  |      p_rec_unapp_id          IN NUMBER,
110  |
111  |  KNOWN ISSUES:
112  |
113  |  NOTES:
114  |
115  |  MODIFICATION HISTORY
116  |  Date        Author                  Description of Change
117  |  09/03/02    Debbie Sue Jancis  	Created
118  *============================================================================*/
119 PROCEDURE create_matching_unapp_records(
120         p_rec_app_id            IN NUMBER,
121         p_rec_unapp_id          IN NUMBER
122                         ) IS
123 BEGIN
124 NULL;
125 --   IF PG_DEBUG in ('Y', 'C') THEN
126 --      arp_standard.debug( 'AR_MRC_ENGINE3.create_matching_unapp_records(+)');
127 --   END IF;
128 
129    /*-----------------------------------------------------------------+
130     |  Dump the input parameters for debugging purposes               |
131     +-----------------------------------------------------------------*/
132 
133 --   IF PG_DEBUG in ('Y', 'C') THEN
134 --      arp_standard.debug('create_matching_unapp_records: ' || ' p_rec_app_id        : ' || to_char(p_rec_app_id));
135 --      arp_standard.debug('create_matching_unapp_records: ' || ' p_rec_unapp_id      : ' || to_char(p_rec_unapp_id));
136 --   END IF;
137 
138    /*-----------------------------------------------------------------+
139     |  First we need to check if MRC is enabled.  If it is than we    |
140     |  continue processing.  If it is not then we are finished.       |
141     +-----------------------------------------------------------------*/
142 --   IF PG_DEBUG in ('Y', 'C') THEN
143 --      arp_standard.debug('create_matching_unapp_records: ' || 'before checking to see if mrc is enabled..');
144 --   END IF;
145 --   IF (gl_ca_utility_pkg.mrc_enabled(
146 --                    p_sob_id => ar_mc_info.primary_sob_id,
147 --                    p_org_id => ar_mc_info.org_id,
148 --                    p_appl_id => 222
149 --                          ))  THEN
150 
151 --        IF PG_DEBUG in ('Y', 'C') THEN
152 --           arp_standard.debug('create_matching_unapp_records: ' || 'MRC is enabled...     ');
153 --        END IF;
154 
155 --           BEGIN
156 --                ar_mc_rec_apps_pkg.create_matching_unapp_records(
157 --                              p_rec_app_id     => p_rec_app_id,
158 --                              p_rec_unapp_id   => p_rec_unapp_id);
159 --           EXCEPTION
160 --            WHEN OTHERS THEN
161 --              IF PG_DEBUG in ('Y', 'C') THEN
162 --                 arp_standard.debug('create_matching_unapp_records: ' || 'error during MRC create matching unapp recs');
163 --              END IF;
164 --              APP_EXCEPTION.RAISE_EXCEPTION;
165 --           END;
166 
167 --    END IF;  /* end of mrc is enabled */
168 
169 --  IF PG_DEBUG in ('Y', 'C') THEN
170 --     arp_standard.debug( 'AR_MRC_ENGINE3.create_matching_unapp_records(-)');
171 --  END IF;
172 
173 END create_matching_unapp_records;
174 
175 /*=============================================================================
176  |  PUBLIC PROCEDURE  receipt_application
177  |
178  |  DESCRIPTION:
179  |                This procedure will be called from ARP_PROCESS_APPLICATION
180  |                to process the mrc data for insert.
181  |
182  |  CALLS PROCEDURES / FUNCTIONS (local to this package body)
183  |
184  |  PARAMETERS
185  |      p_receipt_ps_id         IN NUMBER  - Receipt PS id
186  |      p_invoice_ps_id         IN NUMBER  - Invoice PS id
187  |      p_amount_applied        IN NUMBER
188  |      p_amount_applied_from   IN NUMBER
189  |      p_invoice_currency_code IN VARCHAR2
190  |      p_receipt_currency_code IN VARCHAR2
191  |      p_rec_ra_rec            IN receivable apps rowtype
192  |      p_inv_ra_rec            IN receivable apps rowtype
193  |
194  |  KNOWN ISSUES:
195  |
196  |  NOTES:
197  |
198  |  MODIFICATION HISTORY
199  |  Date        Author                  Description of Change
200  |  09/04/02    Debbie Sue Jancis       Created
201  *============================================================================*/
202 PROCEDURE receipt_application(
203    p_receipt_ps_id      IN ar_payment_schedules.payment_schedule_id%TYPE,
204    p_invoice_ps_id      IN ar_payment_schedules.payment_schedule_id%TYPE,
205    p_amount_applied     IN ar_receivable_applications.amount_applied%TYPE,
206    p_amount_applied_from IN ar_receivable_applications.amount_applied_from%TYPE,
207    p_invoice_currency_code IN ar_payment_schedules.invoice_currency_code%TYPE,
208    p_receipt_currency_code IN ar_cash_receipts.currency_code%TYPE,
209    p_rec_ra_rec         IN ar_receivable_applications %ROWTYPE,
210    p_inv_ra_rec         IN ar_receivable_applications %ROWTYPE
211                         ) IS
212 BEGIN
213 NULL;
214 --   IF PG_DEBUG in ('Y', 'C') THEN
215 --      arp_standard.debug( 'AR_MRC_ENGINE3.receipt_application(+)');
216 --   END IF;
217 
218    /*-----------------------------------------------------------------+
219     |  Dump the input parameters for debugging purposes               |
220     +----------------------------------------------------------------*/
221 
222 --   IF PG_DEBUG in ('Y', 'C') THEN
223 --      arp_standard.debug('receipt_application: ' || ' p_receipt_ps_id  : ' || to_char(p_receipt_ps_id));
224 --      arp_standard.debug('receipt_application: ' || ' p_invoice_ps_id  : ' || to_char(p_invoice_ps_id));
225 --      arp_standard.debug('receipt_application: ' || ' p_amount_applied : ' || to_char(p_amount_applied));
226 --      arp_standard.debug('receipt_application: ' || ' p_amount_applied_from : ' ||
227 --                          to_char(p_amount_applied_from));
228 --      arp_standard.debug('receipt_application: ' || ' p_invoice_currency_code : ' || p_invoice_currency_code);
229 --      arp_standard.debug('receipt_application: ' || ' p_receipt_currency_code : ' || p_receipt_currency_code);
230 --   END IF;
231 
232    /*-----------------------------------------------------------------+
233     |  First we need to check if MRC is enabled.  If it is than we    |
234     |  continue processing.  If it is not then we are finished.       |
235     +-----------------------------------------------------------------*/
236 --   IF PG_DEBUG in ('Y', 'C') THEN
237 --      arp_standard.debug('receipt_application: ' || 'before checking to see if mrc is enabled..');
238 --   END IF;
239 --   IF (gl_ca_utility_pkg.mrc_enabled(
240 --                    p_sob_id => ar_mc_info.primary_sob_id,
241 --                    p_org_id => ar_mc_info.org_id,
242 --                    p_appl_id => 222
243 --                          ))  THEN
244 
245 --        IF PG_DEBUG in ('Y', 'C') THEN
246 --           arp_standard.debug('receipt_application: ' || 'MRC is enabled...     ');
247 --        END IF;
248 
249 --           BEGIN
250 --                ar_mc_rec_apps_pkg.receipt_application(
251 --                      p_receipt_ps_id         => p_receipt_ps_id,
252 --                      p_invoice_ps_id         => p_invoice_ps_id,
253 --                      p_amount_applied        => p_amount_applied,
254 --                      p_amount_applied_from   => p_amount_applied_from,
255 --                      p_invoice_currency_code => p_invoice_currency_code,
256 --                      p_receipt_currency_code => p_receipt_currency_code,
257 --                      p_rec_ra_rec            => p_rec_ra_rec,
258 --                      p_inv_ra_rec            => p_inv_ra_rec);
259 --           EXCEPTION
260 --            WHEN OTHERS THEN
261 --              IF PG_DEBUG in ('Y', 'C') THEN
262 --                 arp_standard.debug('receipt_application: ' || 'error during MRC receipt application');
263 --              END IF;
264 --              APP_EXCEPTION.RAISE_EXCEPTION;
265 --           END;
266 
267 --    END IF;  /* end of mrc is enabled */
268 
269 --  IF PG_DEBUG in ('Y', 'C') THEN
270 --     arp_standard.debug( 'AR_MRC_ENGINE3.receipt_application(-)');
271 --  END IF;
272 
273 END receipt_application;
274 
275 /*=============================================================================
276  |  PUBLIC PROCEDURE  cm_application
277  |
278  |  DESCRIPTION:
279  |                This procedure will be called from ARP_PROCESS_APPLICATION
280  |                to process the mrc data for insert.
281  |
282  |  CALLS PROCEDURES / FUNCTIONS (local to this package body)
283  |
284  |  PARAMETERS
285  |      p_cm_ps_id         IN NUMBER  - credit memo PS id
286  |      p_invoice_ps_id    IN NUMBER  - Invoice PS id
287  |      p_inv_ra_rec       IN receivable apps rowtype
288  |      p_ra_id            IN NUMBER receivable_application_id
289  |  KNOWN ISSUES:
290  |
291  |  NOTES:
292  |
293  |
294  |  MODIFICATION HISTORY
295  |  Date        Author                  Description of Change
296  |  09/04/02    Debbie Sue Jancis       Created
297  *============================================================================*/
298 PROCEDURE cm_application(
299    p_cm_ps_id       IN ar_payment_schedules.payment_schedule_id%TYPE,
300    p_invoice_ps_id  IN ar_payment_schedules.payment_schedule_id%TYPE,
301    p_inv_ra_rec     IN ar_receivable_applications %ROWTYPE,
302    p_ra_id          IN NUMBER
303                  ) IS
304 
305 l_ra_rec  ar_receivable_applications%ROWTYPE;
306 
307 BEGIN
308 NULl;
309 --   IF PG_DEBUG in ('Y', 'C') THEN
310 --      arp_standard.debug( 'AR_MRC_ENGINE3.cm_application(+)');
311 --   END IF;
312    /*-----------------------------------------------------------------+
313     |  Dump the input parameters for debugging purposes               |
314     +----------------------------------------------------------------*/
315 
316 --   IF PG_DEBUG in ('Y', 'C') THEN
317 --      arp_standard.debug('cm_application: ' || ' p_cm_ps_id  : ' || to_char(p_cm_ps_id));
318 --      arp_standard.debug('cm_application: ' || ' p_invoice_ps_id  : ' || to_char(p_invoice_ps_id));
319 --   END IF;
320 
321    /*-----------------------------------------------------------------+
322     |  First we need to check if MRC is enabled.  If it is than we    |
323     |  continue processing.  If it is not then we are finished.       |
324     +-----------------------------------------------------------------*/
325 --   IF PG_DEBUG in ('Y', 'C') THEN
326 --      arp_standard.debug('cm_application: ' || 'before checking to see if mrc is enabled..');
327 --   END IF;
328 --   IF (gl_ca_utility_pkg.mrc_enabled(
329 --                    p_sob_id => ar_mc_info.primary_sob_id,
330 --                    p_org_id => ar_mc_info.org_id,
331 --                    p_appl_id => 222
332 --                          ))  THEN
333 
334 --        IF PG_DEBUG in ('Y', 'C') THEN
335 --           arp_standard.debug('cm_application: ' || 'MRC is enabled...     ');
336 --        END IF;
337 
338 --        IF (p_inv_ra_rec.receivable_application_id IS NULL) THEN
339 --           select *
340 --            INTO l_ra_rec
341 --            from ar_receivable_applications
342 --           where receivable_application_id = p_ra_id;
343 --        ELSE
344 --           l_ra_rec := p_inv_ra_rec;
345 --        END IF;
346 
347 --           BEGIN
348 --                ar_mc_rec_apps_pkg.cm_application(
349 --                      p_cm_ps_id         => p_cm_ps_id,
350 --                      p_invoice_ps_id    => p_invoice_ps_id,
351 --                      p_inv_ra_rec       => l_ra_rec);
355 --                 arp_standard.debug('cm_application: ' || 'error during MRC cm application');
352 --           EXCEPTION
353 --            WHEN OTHERS THEN
354 --              IF PG_DEBUG in ('Y', 'C') THEN
356 --              END IF;
357 --              APP_EXCEPTION.RAISE_EXCEPTION;
358 --           END;
359 
360 --    END IF;  /* end of mrc is enabled */
361 
362 --  IF PG_DEBUG in ('Y', 'C') THEN
363 --     arp_standard.debug( 'AR_MRC_ENGINE3.cm_application(-)');
364 --  END IF;
365 
366 END cm_application;
367 
368 /*=============================================================================
369  |  PUBLIC PROCEDURE  on_account_receipts
370  |
371  |  DESCRIPTION:
372  |                This procedure will be called from ARP_PROCESS_APPLICATION
373  |                to process the mrc data for insert.
374  |
375  |  CALLS PROCEDURES / FUNCTIONS (local to this package body)
376  |
377  |  PARAMETERS
378  |      p_receipt_ps_id    IN NUMBER  - receipt PS id
379  |      p_amount_applied   IN NUMBER
380  |      p_acc_ra_rec       IN receivables apps rowtype
381  |      p_unapp_rec_app_id IN NUMBER
382  |
383  |  KNOWN ISSUES:
384  |
385  |  NOTES:
386  |
387  |
388  |  MODIFICATION HISTORY
389  |  Date        Author                  Description of Change
390  |  09/04/02    Debbie Sue Jancis       Created
391  *============================================================================*/
392 PROCEDURE on_account_receipts(
393    p_receipt_ps_id       IN ar_payment_schedules.payment_schedule_id%TYPE,
394    p_amount_applied      IN ar_receivable_applications.amount_applied%TYPE,
395    p_acc_ra_rec          IN ar_receivable_applications %ROWTYPE,
396    p_unapp_rec_app_id    IN NUMBER
397                  ) IS
398 BEGIN
399 NULL;
400 --   IF PG_DEBUG in ('Y', 'C') THEN
401 --      arp_standard.debug( 'AR_MRC_ENGINE3.on_account_receipts(+)');
402 --   END IF;
403    /*-----------------------------------------------------------------+
404     |  Dump the input parameters for debugging purposes               |
405     +----------------------------------------------------------------*/
406 
407 --   IF PG_DEBUG in ('Y', 'C') THEN
408 --      arp_standard.debug('on_account_receipts: ' || ' p_receipt_ps_id  : ' || to_char(p_receipt_ps_id));
409 --      arp_standard.debug('on_account_receipts: ' || ' p_amount_applied : ' || to_char(p_amount_applied));
410 --      arp_standard.debug('on_account_receipts: ' || ' p_unapp_rec_app_id:' || to_char(p_unapp_rec_app_id));
411 --   END IF;
412 
413    /*-----------------------------------------------------------------+
414     |  First we need to check if MRC is enabled.  If it is than we    |
415     |  continue processing.  If it is not then we are finished.       |
416     +-----------------------------------------------------------------*/
417 --   IF PG_DEBUG in ('Y', 'C') THEN
418 --      arp_standard.debug('on_account_receipts: ' || 'before checking to see if mrc is enabled..');
419 --   END IF;
420 --   IF (gl_ca_utility_pkg.mrc_enabled(
421 --                    p_sob_id => ar_mc_info.primary_sob_id,
422 --                    p_org_id => ar_mc_info.org_id,
423 --                    p_appl_id => 222
424 --                          ))  THEN
425 
426 --        IF PG_DEBUG in ('Y', 'C') THEN
427 --           arp_standard.debug('on_account_receipts: ' || 'MRC is enabled...     ');
428 --        END IF;
429 
430 --           BEGIN
431 --                ar_mc_rec_apps_pkg.on_account_receipts(
432 --                      p_receipt_ps_id     => p_receipt_ps_id,
433 --                      p_amount_applied    => p_amount_applied,
434 --                      p_acc_ra_rec        => p_acc_ra_rec,
435 --                      p_unapp_rec_app_id  => p_unapp_rec_app_id);
436 --           EXCEPTION
437 --            WHEN OTHERS THEN
438 --              IF PG_DEBUG in ('Y', 'C') THEN
439 --                 arp_standard.debug('error during MRC on_account_receipts');
440 --              END IF;
441 --              APP_EXCEPTION.RAISE_EXCEPTION;
442 --           END;
443 
444 --    END IF;  /* end of mrc is enabled */
445 
446 --  IF PG_DEBUG in ('Y', 'C') THEN
447 --     arp_standard.debug( 'AR_MRC_ENGINE3.on_account_receipts(-)');
448 --  END IF;
449 
450 END on_account_receipts;
451 
452 /*=============================================================================
453  |  PUBLIC PROCEDURE  other_account_application
454  |
455  |  DESCRIPTION:
456  |                This procedure will be called from ARP_PROCESS_APPLICATION
457  |                to process the mrc data for insert.
458  |
459  |  CALLS PROCEDURES / FUNCTIONS (local to this package body)
460  |
461  |  PARAMETERS
462  |      p_receipt_ps_id    IN NUMBER  - receipt PS id
463  |      p_amount_applied   IN NUMBER
464  |      p_otheracc_ra_rec  IN receivables apps rowtype
465  |      p_unapp_rec_app_id IN NUMBER
466  |
467  |  KNOWN ISSUES:
468  |
469  |  NOTES:
470  |
471  |
472  |  MODIFICATION HISTORY
473  |  Date        Author                  Description of Change
474  |  09/04/02    Debbie Sue Jancis       Created
475  *============================================================================*/
476 PROCEDURE other_account_application(
477    p_receipt_ps_id       IN ar_payment_schedules.payment_schedule_id%TYPE,
478    p_amount_applied      IN ar_receivable_applications.amount_applied%TYPE,
482 BEGIN
479    p_otheracc_ra_rec     IN ar_receivable_applications %ROWTYPE,
480    p_unapp_rec_app_id    IN NUMBER
481                  ) IS
483 NULL;
484 --   IF PG_DEBUG in ('Y', 'C') THEN
485 --      arp_standard.debug( 'AR_MRC_ENGINE3.other_account_application(+)');
486 --   END IF;
487    /*-----------------------------------------------------------------+
488     |  Dump the input parameters for debugging purposes               |
489     +----------------------------------------------------------------*/
490 
491 --   IF PG_DEBUG in ('Y', 'C') THEN
492 --      arp_standard.debug('other_account_application: ' || ' p_receipt_ps_id  : ' || to_char(p_receipt_ps_id));
493 --      arp_standard.debug('other_account_application: ' || ' p_amount_applied : ' || to_char(p_amount_applied));
494 --      arp_standard.debug('other_account_application: ' || ' p_unapp_rec_app_id:' || to_char(p_unapp_rec_app_id));
495 --   END IF;
496 
497    /*-----------------------------------------------------------------+
498     |  First we need to check if MRC is enabled.  If it is than we    |
499     |  continue processing.  If it is not then we are finished.       |
500     +-----------------------------------------------------------------*/
501 --   IF PG_DEBUG in ('Y', 'C') THEN
502 --      arp_standard.debug('other_account_application: ' || 'before checking to see if mrc is enabled..');
503 --   END IF;
504 --   IF (gl_ca_utility_pkg.mrc_enabled(
505 --                    p_sob_id => ar_mc_info.primary_sob_id,
506 --                    p_org_id => ar_mc_info.org_id,
507 --                    p_appl_id => 222
508 --                          ))  THEN
509 
510 --        IF PG_DEBUG in ('Y', 'C') THEN
511 --           arp_standard.debug('other_account_application: ' || 'MRC is enabled...     ');
512 --        END IF;
513 
514 --           BEGIN
515 --                ar_mc_rec_apps_pkg.other_account_application(
516 --                      p_receipt_ps_id     => p_receipt_ps_id,
517 --                      p_amount_applied    => p_amount_applied,
518 --                      p_otheracc_ra_rec   => p_otheracc_ra_rec,
519 --                      p_unapp_rec_app_id  => p_unapp_rec_app_id);
520 --           EXCEPTION
521 --            WHEN OTHERS THEN
522 --              IF PG_DEBUG in ('Y', 'C') THEN
523 --                 arp_standard.debug('error during MRC other_account_application');
524 --              END IF;
525 --              APP_EXCEPTION.RAISE_EXCEPTION;
526 --           END;
527 
528 --    END IF;  /* end of mrc is enabled */
529 
530 --  IF PG_DEBUG in ('Y', 'C') THEN
531 --     arp_standard.debug( 'AR_MRC_ENGINE3.other_account_application(-)');
532 --  END IF;
533 
534  END other_account_application;
535 
536 /*=============================================================================
537  |  PUBLIC PROCEDURE  reversal_insert_oppos_ra_recs
538  |
539  |  DESCRIPTION:
540  |                This procedure will be called from ARP_PROCESS_APPLICATION
541  |                and ARP_RATE_ADJUSTMENTS
542  |                to process the mrc data for insert.
543  |
544  |  CALLS PROCEDURES / FUNCTIONS (local to this package body)
545  |
546  |  PARAMETERS
547  |      p_ra_rec           IN receivables apps rowtype
548  |      p_orig_rec_app_id  IN NUMBER
549  |      p_new_rec_app_id   IN NUMBER
550  |
551  |  KNOWN ISSUES:
552  |
553  |  NOTES:
554  |
555  |
556  |  MODIFICATION HISTORY
557  |  Date        Author                  Description of Change
558  |  09/04/02    Debbie Sue Jancis       Created
559  *============================================================================*/
560 PROCEDURE reversal_insert_oppos_ra_recs(
561    p_ra_rec              IN ar_receivable_applications %ROWTYPE,
562    p_orig_rec_app_id     IN NUMBER,
563    p_new_rec_app_id      IN NUMBER
564                  ) IS
565 BEGIN
566 NULL;
567 --   IF PG_DEBUG in ('Y', 'C') THEN
568 --      arp_standard.debug( 'AR_MRC_ENGINE3.reversal_insert_oppos_ra_recs(+)');
569 --   END IF;
570    /*-----------------------------------------------------------------+
571     |  Dump the input parameters for debugging purposes               |
572     +----------------------------------------------------------------*/
573 
574 --   IF PG_DEBUG in ('Y', 'C') THEN
575 --      arp_standard.debug('reversal_insert_oppos_ra_recs: ' || ' p_orig_rec_app_id:' || to_char(p_orig_rec_app_id));
576 --      arp_standard.debug('reversal_insert_oppos_ra_recs: ' || ' p_new_rec_app_id :' || to_char(p_new_rec_app_id));
577 --   END IF;
578 
579    /*-----------------------------------------------------------------+
580     |  First we need to check if MRC is enabled.  If it is than we    |
581     |  continue processing.  If it is not then we are finished.       |
582     +-----------------------------------------------------------------*/
583 --   IF PG_DEBUG in ('Y', 'C') THEN
584 --      arp_standard.debug('reversal_insert_oppos_ra_recs: ' || 'before checking to see if mrc is enabled..');
585 --   END IF;
586 --   IF (gl_ca_utility_pkg.mrc_enabled(
587 --                    p_sob_id => ar_mc_info.primary_sob_id,
588 --                    p_org_id => ar_mc_info.org_id,
589 --                    p_appl_id => 222
590 --                          ))  THEN
591 
592 --        IF PG_DEBUG in ('Y', 'C') THEN
593 --           arp_standard.debug('reversal_insert_oppos_ra_recs: ' || 'MRC is enabled...     ');
597 --                ar_mc_rec_apps_pkg.reversal_insert_oppos_ra_recs(
594 --        END IF;
595 
596 --           BEGIN
598 --                      p_ra_rec           => p_ra_rec,
599 --                      p_orig_rec_app_id  => p_orig_rec_app_id,
600 --                      p_new_rec_app_id   => p_new_rec_app_id);
601 --           EXCEPTION
602 --            WHEN OTHERS THEN
603 --              IF PG_DEBUG in ('Y', 'C') THEN
604 --                 arp_standard.debug('error during MRC reversal_insert_oppos_ra_recs');
605 --              END IF;
606 --              APP_EXCEPTION.RAISE_EXCEPTION;
607 --           END;
608 
609 --    END IF;  /* end of mrc is enabled */
610 
611 --  IF PG_DEBUG in ('Y', 'C') THEN
612 --     arp_standard.debug( 'AR_MRC_ENGINE3.reversal_insert_oppos_ra_recs(-)');
613 --  END IF;
614 
615  END reversal_insert_oppos_ra_recs;
616 
617 /*=============================================================================
618  |  PUBLIC PROCEDURE  reverse_ra_recs
619  |
620  |  DESCRIPTION:
621  |                This procedure will be called from ARP_CONFIRMATION
622  |                to process the mrc data for insert.
623  |
624  |  CALLS PROCEDURES / FUNCTIONS (local to this package body)
625  |
626  |  PARAMETERS
627  |      p_orig_app_id  IN NUMBER
628  |      p_new_app_id   IN NUMBER
629  |
630  |  KNOWN ISSUES:
631  |
632  |  NOTES:
633  |
634  |
635  |  MODIFICATION HISTORY
636  |  Date        Author                  Description of Change
637  |  09/04/02    Debbie Sue Jancis       Created
638  *============================================================================*/
639 PROCEDURE reverse_ra_recs(
640    p_orig_app_id     IN NUMBER,
641    p_new_app_id      IN NUMBER
642                  ) IS
643 BEGIN
644 NULL;
645 --   IF PG_DEBUG in ('Y', 'C') THEN
646 --      arp_standard.debug( 'AR_MRC_ENGINE3.reverse_ra_recs(+)');
647 --   END IF;
648    /*-----------------------------------------------------------------+
649     |  Dump the input parameters for debugging purposes               |
650     +----------------------------------------------------------------*/
651 
652 --   IF PG_DEBUG in ('Y', 'C') THEN
653 --      arp_standard.debug('reverse_ra_recs: ' || ' p_orig_rec_app_id:' || to_char(p_orig_app_id));
654 --      arp_standard.debug('reverse_ra_recs: ' || ' p_new_rec_app_id :' || to_char(p_new_app_id));
655 --   END IF;
656 
657    /*-----------------------------------------------------------------+
658     |  First we need to check if MRC is enabled.  If it is than we    |
659     |  continue processing.  If it is not then we are finished.       |
660     +-----------------------------------------------------------------*/
661 --   IF PG_DEBUG in ('Y', 'C') THEN
662 --      arp_standard.debug('reverse_ra_recs: ' || 'before checking to see if mrc is enabled..');
663 --   END IF;
664 --   IF (gl_ca_utility_pkg.mrc_enabled(
665 --                    p_sob_id => ar_mc_info.primary_sob_id,
666 --                    p_org_id => ar_mc_info.org_id,
667 --                    p_appl_id => 222
668 --                          ))  THEN
669 
670 --        IF PG_DEBUG in ('Y', 'C') THEN
671 --           arp_standard.debug('reverse_ra_recs: ' || 'MRC is enabled...     ');
672 --        END IF;
673 
674 --           BEGIN
675 --                ar_mc_rec_apps_pkg.reverse_ra_recs(
676 --                      p_orig_app_id  => p_orig_app_id,
677 --                      p_new_app_id   => p_new_app_id);
678 --           EXCEPTION
679 --            WHEN OTHERS THEN
680 --              IF PG_DEBUG in ('Y', 'C') THEN
681 --                 arp_standard.debug('error during MRC reverse_ra_recs ');
682 --              END IF;
683 --              APP_EXCEPTION.RAISE_EXCEPTION;
684 --           END;
685 
686 --    END IF;  /* end of mrc is enabled */
687 
688 --  IF PG_DEBUG in ('Y', 'C') THEN
689 --     arp_standard.debug( 'AR_MRC_ENGINE3.reverse_ra_recs(-)');
690 --  END IF;
691 
692  END reverse_ra_recs;
693 
694 /*=============================================================================
695  |  PUBLIC PROCEDURE  confirm_ra_rec_update
696  |
697  |  DESCRIPTION:
698  |                This procedure will be called from ARP_CONFIRMATION
699  |                to process the mrc data for update.
700  |
701  |  CALLS PROCEDURES / FUNCTIONS (local to this package body)
702  |
703  |  PARAMETERS
704  |      p_rec_app_id   IN NUMBER
705  |
706  |  KNOWN ISSUES:
707  |
708  |  NOTES:
709  |
710  |
711  |  MODIFICATION HISTORY
712  |  Date        Author                  Description of Change
713  |  09/04/02    Debbie Sue Jancis       Created
714  *============================================================================*/
715 PROCEDURE confirm_ra_rec_update(
716    p_rec_app_id      IN NUMBER
717                  ) IS
718 BEGIN
719 NULL;
720 --   IF PG_DEBUG in ('Y', 'C') THEN
721 --      arp_standard.debug( 'AR_MRC_ENGINE3.confirm_ra_rec_update(+)');
722 --   END IF;
723    /*-----------------------------------------------------------------+
724     |  Dump the input parameters for debugging purposes               |
725     +----------------------------------------------------------------*/
726 
727 --   IF PG_DEBUG in ('Y', 'C') THEN
731    /*-----------------------------------------------------------------+
728 --      arp_standard.debug('confirm_ra_rec_update: ' || ' p_rec_app_id :' || to_char(p_rec_app_id));
729 --   END IF;
730 
732     |  First we need to check if MRC is enabled.  If it is than we    |
733     |  continue processing.  If it is not then we are finished.       |
734     +-----------------------------------------------------------------*/
735 --   IF PG_DEBUG in ('Y', 'C') THEN
736 --      arp_standard.debug('confirm_ra_rec_update: ' || 'before checking to see if mrc is enabled..');
737 --   END IF;
738 --   IF (gl_ca_utility_pkg.mrc_enabled(
739 --                    p_sob_id => ar_mc_info.primary_sob_id,
740 --                    p_org_id => ar_mc_info.org_id,
741 --                    p_appl_id => 222
742 --                          ))  THEN
743 --        IF PG_DEBUG in ('Y', 'C') THEN
744 --           arp_standard.debug('confirm_ra_rec_update: ' || 'MRC is enabled...     ');
745 --        END IF;
746 
747 --           BEGIN
748 --                ar_mc_rec_apps_pkg.confirm_ra_rec_update(
749 --                      p_rec_app_id   => p_rec_app_id);
750 --           EXCEPTION
751 --            WHEN OTHERS THEN
752 --              IF PG_DEBUG in ('Y', 'C') THEN
753 --                 arp_standard.debug('error during MRC confirm_ra_rec_update ');
754 --              END IF;
755 --              APP_EXCEPTION.RAISE_EXCEPTION;
756 --           END;
757 
758 --    END IF;  /* end of mrc is enabled */
759 
760 --  IF PG_DEBUG in ('Y', 'C') THEN
761 --     arp_standard.debug( 'AR_MRC_ENGINE3.confirm_ra_rec_update(-)');
762 --  END IF;
763 
764  END confirm_ra_rec_update;
765 
766 /*=============================================================================
767  |  PUBLIC PROCEDURE  update_cm_application
768  |
769  |  DESCRIPTION:
770  |                This procedure will be called from PRO*C files in the
771  |		  /src/paysched directory (araups.lpc and araupds.lpc)
772  |                to process the mrc data for update.
773  |
774  |  CALLS PROCEDURES / FUNCTIONS (local to this package body)
775  |
776  |  PARAMETERS
777  |      p_rec_app_id      IN NUMBER
778  |      p_app_ps_id       IN NUMBER,
779  |      p_ct_id           IN NUMBER,
780  |      p_amount_applied  IN NUMBER
781  |
782  |  KNOWN ISSUES:
783  |
784  |  NOTES:
785  |
786  |
787  |  MODIFICATION HISTORY
788  |  Date        Author                  Description of Change
789  |  09/04/02    Debbie Sue Jancis       Created
790  *============================================================================*/
791 PROCEDURE update_cm_application(
792    p_rec_app_id      IN NUMBER,
793    p_app_ps_id       IN NUMBER,
794    p_ct_id           IN NUMBER,
795    p_amount_applied  IN NUMBER
796                  ) IS
797 BEGIN
798 NULL;
799 --   IF PG_DEBUG in ('Y', 'C') THEN
800 --      arp_standard.debug( 'AR_MRC_ENGINE3.update_cm_application(+)');
801 --   END IF;
802    /*-----------------------------------------------------------------+
803     |  Dump the input parameters for debugging purposes               |
804     +----------------------------------------------------------------*/
805 
806 --   IF PG_DEBUG in ('Y', 'C') THEN
807 --      arp_standard.debug('update_cm_application: ' || ' p_rec_app_id     :' || to_char(p_rec_app_id));
808 --      arp_standard.debug('update_cm_application: ' || ' p_app_ps_id      :' || to_char(p_app_ps_id));
809 --      arp_standard.debug('update_cm_application: ' || ' p_ct_id          :' || to_char(p_ct_id));
810 --      arp_standard.debug('update_cm_application: ' || ' p_amount_applied :' || to_char(p_amount_applied));
811 --   END IF;
812 
813    /*-----------------------------------------------------------------+
814     |  First we need to check if MRC is enabled.  If it is than we    |
815     |  continue processing.  If it is not then we are finished.       |
816     +-----------------------------------------------------------------*/
817 --   IF PG_DEBUG in ('Y', 'C') THEN
818 --      arp_standard.debug('update_cm_application: ' || 'before checking to see if mrc is enabled..');
819 --   END IF;
820 --   IF (gl_ca_utility_pkg.mrc_enabled(
821 --                    p_sob_id => ar_mc_info.primary_sob_id,
822 --                    p_org_id => ar_mc_info.org_id,
823 --                    p_appl_id => 222
824 --                          ))  THEN
825 --        IF PG_DEBUG in ('Y', 'C') THEN
826 --           arp_standard.debug('update_cm_application: ' || 'MRC is enabled...     ');
827 --        END IF;
828 
829 --           BEGIN
830 --                ar_mc_rec_apps_pkg.update_cm_application(
831 --                      p_rec_app_id      => p_rec_app_id,
832 --                      p_app_ps_id       => p_app_ps_id,
833 --                      p_ct_id           => p_ct_id,
834 --                      p_amount_applied  => p_amount_applied);
835 --           EXCEPTION
836 --            WHEN OTHERS THEN
837 --              IF PG_DEBUG in ('Y', 'C') THEN
838 --                 arp_standard.debug('error during MRC update_cm_application ');
839 --              END IF;
840 --              APP_EXCEPTION.RAISE_EXCEPTION;
841 --           END;
842 
843 --    END IF;  /* end of mrc is enabled */
844 
845 --  IF PG_DEBUG in ('Y', 'C') THEN
846 --     arp_standard.debug( 'AR_MRC_ENGINE3.update_cm_application(-)');
847 --  END IF;
848 
849  END update_cm_application;
850 
854  |  DESCRIPTION:
851 /*=============================================================================
852  |  PUBLIC PROCEDURE  update_ra_rec_quickcash
853  |
855  |                This procedure will be called from PRO*C files in the
856  |                /src/cash directory
857  |                to process the mrc data for update.
858  |
859  |  CALLS PROCEDURES / FUNCTIONS (local to this package body)
860  |
861  |  PARAMETERS
862  |      p_rec_app_id      IN NUMBER
863  |      p_cash_receipt_id IN NUMBER,
864  |      p_amount_applied  IN NUMBER
865  |
866  |  KNOWN ISSUES:
867  |
868  |  NOTES:
869  |
870  |
871  |  MODIFICATION HISTORY
872  |  Date        Author                  Description of Change
873  |  09/04/02    Debbie Sue Jancis       Created
874  *============================================================================*/
875 PROCEDURE update_ra_rec_quickcash(
876    p_rec_app_id      IN NUMBER,
877    p_cash_receipt_id IN NUMBER,
878    p_amount_applied  IN NUMBER
879                  ) IS
880 BEGIN
881 NULL;
882 --   IF PG_DEBUG in ('Y', 'C') THEN
883 --      arp_standard.debug( 'AR_MRC_ENGINE3.update_ra_rec_quickcash(+)');
884 --   END IF;
885    /*-----------------------------------------------------------------+
886     |  Dump the input parameters for debugging purposes               |
887     +----------------------------------------------------------------*/
888 
889 --   IF PG_DEBUG in ('Y', 'C') THEN
890 --      arp_standard.debug('update_ra_rec_quickcash: ' || ' p_rec_app_id      :' || to_char(p_rec_app_id));
891 --      arp_standard.debug('update_ra_rec_quickcash: ' || ' p_cash_receipt_id :' || to_char(p_cash_receipt_id));
892 --      arp_standard.debug('update_ra_rec_quickcash: ' || ' p_amount_applied  :' || to_char(p_amount_applied));
893 --   END IF;
894 
895    /*-----------------------------------------------------------------+
896     |  First we need to check if MRC is enabled.  If it is than we    |
897     |  continue processing.  If it is not then we are finished.       |
898     +-----------------------------------------------------------------*/
899 --   IF PG_DEBUG in ('Y', 'C') THEN
900 --      arp_standard.debug('update_ra_rec_quickcash: ' || 'before checking to see if mrc is enabled..');
901 --   END IF;
902 --   IF (gl_ca_utility_pkg.mrc_enabled(
903 --                    p_sob_id => ar_mc_info.primary_sob_id,
904 --                    p_org_id => ar_mc_info.org_id,
905 --                    p_appl_id => 222
906 --                          ))  THEN
907 --        IF PG_DEBUG in ('Y', 'C') THEN
908 --           arp_standard.debug('update_ra_rec_quickcash: ' || 'MRC is enabled...     ');
909 --        END IF;
910 
911 --           BEGIN
912 --                ar_mc_rec_apps_pkg.update_ra_rec_quickcash(
913 --                      p_rec_app_id      => p_rec_app_id,
914 --                      p_cash_receipt_id => p_cash_receipt_id,
915 --                      p_amount_applied  => p_amount_applied);
916 --           EXCEPTION
917 --            WHEN OTHERS THEN
918 --              IF PG_DEBUG in ('Y', 'C') THEN
919 --                 arp_standard.debug('error during MRC update_ra_rec_quickcash ');
920 --              END IF;
921 --              APP_EXCEPTION.RAISE_EXCEPTION;
922 --           END;
923 
924 --    END IF;  /* end of mrc is enabled */
925 --  IF PG_DEBUG in ('Y', 'C') THEN
926 --     arp_standard.debug( 'AR_MRC_ENGINE3.update_ra_rec_quickcash(-)');
927 --  END IF;
928 
929  END update_ra_rec_quickcash;
930 
931 /*=============================================================================
932  |  PUBLIC PROCEDURE  insert_ra_rec_quickcash
933  |
934  |  DESCRIPTION:
935  |                This procedure will be called from PRO*C files in the
936  |                /src/cash directory
937  |                to process the mrc data for insert.
938  |
939  |  CALLS PROCEDURES / FUNCTIONS (local to this package body)
940  |
941  |  PARAMETERS
942  |      p_rec_app_id      IN NUMBER
943  |
944  |  KNOWN ISSUES:
945  |
946  |  NOTES:
947  |
948  |
949  |  MODIFICATION HISTORY
950  |  Date        Author                  Description of Change
951  |  09/04/02    Debbie Sue Jancis       Created
952  *============================================================================*/
953 PROCEDURE insert_ra_rec_quickcash(
954    p_rec_app_id      IN NUMBER
955                  ) IS
956 BEGIN
957 NULL;
958 --   IF PG_DEBUG in ('Y', 'C') THEN
959 --      arp_standard.debug( 'AR_MRC_ENGINE3.insert_ra_rec_quickcash(+)');
960 --   END IF;
961    /*-----------------------------------------------------------------+
962     |  Dump the input parameters for debugging purposes               |
963     +----------------------------------------------------------------*/
964 
965 --   IF PG_DEBUG in ('Y', 'C') THEN
966 --      arp_standard.debug('insert_ra_rec_quickcash: ' || ' p_rec_app_id      :' || to_char(p_rec_app_id));
967 --   END IF;
968 
969    /*-----------------------------------------------------------------+
970     |  First we need to check if MRC is enabled.  If it is than we    |
971     |  continue processing.  If it is not then we are finished.       |
972     +-----------------------------------------------------------------*/
973 --   IF PG_DEBUG in ('Y', 'C') THEN
977 --                    p_sob_id => ar_mc_info.primary_sob_id,
974 --      arp_standard.debug('insert_ra_rec_quickcash: ' || 'before checking to see if mrc is enabled..');
975 --   END IF;
976 --   IF (gl_ca_utility_pkg.mrc_enabled(
978 --                    p_org_id => ar_mc_info.org_id,
979 --                    p_appl_id => 222
980 --                          ))  THEN
981 --        IF PG_DEBUG in ('Y', 'C') THEN
982 --           arp_standard.debug('insert_ra_rec_quickcash: ' || 'MRC is enabled...     ');
983 --        END IF;
984 
985 --           BEGIN
986 --                ar_mc_rec_apps_pkg.insert_ra_rec_quickcash(
987 --                      p_rec_app_id      => p_rec_app_id);
988 --           EXCEPTION
989 --            WHEN OTHERS THEN
990 --              IF PG_DEBUG in ('Y', 'C') THEN
991 --                 arp_standard.debug('error during MRC insert_ra_rec_quickcash ');
992 --              END IF;
993 --              APP_EXCEPTION.RAISE_EXCEPTION;
994 --           END;
995 
996 --    END IF;  /* end of mrc is enabled */
997 --  IF PG_DEBUG in ('Y', 'C') THEN
998 --     arp_standard.debug( 'AR_MRC_ENGINE3.insert_ra_rec_quickcash(-)');
999 --  END IF;
1000 
1001  END insert_ra_rec_quickcash;
1002 
1003 /*=============================================================================
1004  |  PUBLIC PROCEDURE  update_selected_transaction
1005  |
1006  |  DESCRIPTION:
1007  |                This procedure will be called from
1008  |                ARP_PROCESS_APPLICATION(ARCEAPPB.pls)
1009  |                to process the mrc data for insert.
1010  |
1011  |  CALLS PROCEDURES / FUNCTIONS (local to this package body)
1012  |
1013  |  PARAMETERS
1014  |      pn_amount_applied IN NUMBER
1015  |      p_app_ra_rec      IN ar_receivable_applications%ROWTYPE
1016  |      p_unapp_ra_rec    IN ar_receivable_applications%ROWTYPE
1017  |
1018  |  KNOWN ISSUES:
1019  |
1020  |  NOTES:
1021  |
1022  |
1023  |  MODIFICATION HISTORY
1024  |  Date        Author                  Description of Change
1025  |  09/09/02    Debbie Sue Jancis       Created
1026  *============================================================================*/
1027 PROCEDURE update_selected_transaction(
1028    pn_amount_applied   IN NUMBER,
1029    p_app_ra_rec        IN ar_receivable_applications%ROWTYPE,
1030    p_unapp_ra_rec      IN ar_receivable_applications%ROWTYPE
1031                  ) IS
1032 BEGIN
1033 NULL;
1034 --   IF PG_DEBUG in ('Y', 'C') THEN
1035 --      arp_standard.debug( 'AR_MRC_ENGINE3.update_selected_transaction(+)');
1036 --   END IF;
1037    /*-----------------------------------------------------------------+
1038     |  Dump the input parameters for debugging purposes               |
1039     +----------------------------------------------------------------*/
1040 
1041 --   IF PG_DEBUG in ('Y', 'C') THEN
1042 --      arp_standard.debug('update_selected_transaction: ' || ' pn_amount_applied :' || to_char(pn_amount_applied));
1043 --   END IF;
1044 
1045    /*-----------------------------------------------------------------+
1046     |  First we need to check if MRC is enabled.  If it is than we    |
1047     |  continue processing.  If it is not then we are finished.       |
1048     +-----------------------------------------------------------------*/
1049 --   IF PG_DEBUG in ('Y', 'C') THEN
1050 --      arp_standard.debug('update_selected_transaction: ' || 'before checking to see if mrc is enabled..');
1051 --   END IF;
1052 --   IF (gl_ca_utility_pkg.mrc_enabled(
1053 --                    p_sob_id => ar_mc_info.primary_sob_id,
1054 --                    p_org_id => ar_mc_info.org_id,
1055 --                    p_appl_id => 222
1056 --                          ))  THEN
1057 --        IF PG_DEBUG in ('Y', 'C') THEN
1058 --           arp_standard.debug('update_selected_transaction: ' || 'MRC is enabled...     ');
1059 --        END IF;
1060 --           BEGIN
1061 --                ar_mc_rec_apps_pkg.update_selected_transaction(
1062 --                      pn_amount_applied => pn_amount_applied,
1063 --                      p_app_ra_rec      => p_app_ra_rec,
1064 --                      p_unapp_ra_rec    => p_unapp_ra_rec);
1065 --           EXCEPTION
1066 --            WHEN OTHERS THEN
1067 --              IF PG_DEBUG in ('Y', 'C') THEN
1068 --                 arp_standard.debug('update_selected_transaction: ' || 'error during MRC update_selected_transacation ');
1069 --              END IF;
1070 --              APP_EXCEPTION.RAISE_EXCEPTION;
1071 --           END;
1072 
1073 --    END IF;  /* end of mrc is enabled */
1074 --  IF PG_DEBUG in ('Y', 'C') THEN
1075 --     arp_standard.debug( 'AR_MRC_ENGINE3.update_selected_transaction(-)');
1076 --  END IF;
1077 
1078  END update_selected_transaction;
1079 
1080 /*=============================================================================
1081  |  PUBLIC PROCEDURE  activity_application
1082  |
1083  |  DESCRIPTION:
1084  |                This procedure will be called from
1085  |                ARP_PROCESS_APPLICATION(ARCEAPPB.pls)
1086  |                to process the mrc data for insert.
1087  |
1088  |  CALLS PROCEDURES / FUNCTIONS (local to this package body)
1089  |
1090  |  PARAMETERS
1091  |      p_receipt_ps_id       IN ar_payment_schedules.payment_schedule_id%TYPE
1092  |      p_amount_applied      IN NUMBER
1093  |      p_application_ref_id  IN NUMBER
1094  |      p_misc_ref_id         IN NUMBER
1095  |      p_application_ps_id   IN NUMBER
1099  |  KNOWN ISSUES:
1096  |      p_activity_ra_rec     IN ar_receivable_applications%ROWTYPE
1097  |      p_unapp_ra_rec        IN ar_receivable_applications%ROWTYPE
1098  |
1100  |
1101  |  NOTES:
1102  |
1103  |
1104  |  MODIFICATION HISTORY
1105  |  Date        Author                  Description of Change
1106  |  09/09/02    Debbie Sue Jancis       Created
1107  *============================================================================*/
1108 PROCEDURE activity_application(
1109         p_receipt_ps_id       IN ar_payment_schedules.payment_schedule_id%TYPE,
1110         p_amount_applied      IN NUMBER,
1111         p_application_ref_id  IN NUMBER,
1112         p_misc_ref_id         IN NUMBER,
1113         p_application_ps_id   IN NUMBER,
1114         p_activity_ra_rec     IN ar_receivable_applications%ROWTYPE,
1115         p_unapp_ra_rec        IN ar_receivable_applications%ROWTYPE
1116                  ) IS
1117 BEGIN
1118 NULL;
1119 --   IF PG_DEBUG in ('Y', 'C') THEN
1120 --      arp_standard.debug( 'AR_MRC_ENGINE3.activity_application(+)');
1121 --   END IF;
1122    /*-----------------------------------------------------------------+
1123     |  Dump the input parameters for debugging purposes               |
1124     +----------------------------------------------------------------*/
1125 
1126 --  IF PG_DEBUG in ('Y', 'C') THEN
1127 --     arp_standard.debug('activity_application: ' || 'p_receipt_ps_id  :' || to_char(p_receipt_ps_id ));
1128 --     arp_standard.debug('activity_application: ' || 'p_amount_applied :' || to_char(p_amount_applied));
1129 --     arp_standard.debug('activity_application: ' || 'p_application_ref_id :' || to_char(p_application_ref_id));
1130 --     arp_standard.debug('activity_application: ' || 'p_misc_ref_id    :' || to_char(p_misc_ref_id));
1131 --     arp_standard.debug('activity_application: ' || 'p_application_ps_id :' || to_char(p_application_ps_id));
1132 --  END IF;
1133 
1134    /*-----------------------------------------------------------------+
1135     |  First we need to check if MRC is enabled.  If it is than we    |
1136     |  continue processing.  If it is not then we are finished.       |
1137     +-----------------------------------------------------------------*/
1138 --   IF PG_DEBUG in ('Y', 'C') THEN
1139 --      arp_standard.debug('activity_application: ' || 'before checking to see if mrc is enabled..');
1140 --   END IF;
1141 --   IF (gl_ca_utility_pkg.mrc_enabled(
1142 --                    p_sob_id => ar_mc_info.primary_sob_id,
1143 --                    p_org_id => ar_mc_info.org_id,
1144 --                    p_appl_id => 222
1145 --                          ))  THEN
1146 --        IF PG_DEBUG in ('Y', 'C') THEN
1147 --           arp_standard.debug('activity_application: ' || 'MRC is enabled...     ');
1148 --        END IF;
1149 --           BEGIN
1150 --                ar_mc_rec_apps_pkg.activity_application(
1151 --                      p_receipt_ps_id      => p_receipt_ps_id,
1152 --                      p_amount_applied     => p_amount_applied,
1153 --                      p_application_ref_id => p_application_ref_id,
1154 --                      p_misc_ref_id        => p_misc_ref_id,
1155 --                      p_application_ps_id  => p_application_ps_id,
1156 --                      p_activity_ra_rec    => p_activity_ra_rec,
1157 --                      p_unapp_ra_rec       => p_unapp_ra_rec);
1158 --           EXCEPTION
1159 --            WHEN OTHERS THEN
1160 --              IF PG_DEBUG in ('Y', 'C') THEN
1161 --                 arp_standard.debug('error during MRC activity_application');
1162 --              END IF;
1163 --              APP_EXCEPTION.RAISE_EXCEPTION;
1164 --           END;
1165 
1166 --    END IF;  /* end of mrc is enabled */
1167 --  IF PG_DEBUG in ('Y', 'C') THEN
1168 --     arp_standard.debug( 'AR_MRC_ENGINE3.activity_application(-)');
1169 --  END IF;
1170 
1171  END activity_application;
1172 
1173 /*=============================================================================
1174  |  PUBLIC PROCEDURE  rate_adj_insert_rec
1175  |
1176  |  DESCRIPTION:
1177  |                This procedure will be called from
1178  |                ARP_RATE_ADJUSTMENT
1179  |                to process the mrc data for insert.
1180  |
1181  |  CALLS PROCEDURES / FUNCTIONS (local to this package body)
1182  |
1183  |  PARAMETERS
1184  |        p_app_ra_rec          IN AR_RECEIVABLE_APPLICATIONS%ROWTYPE
1185  |        p_unapp_ra_rec        IN AR_RECEIVABLE_APPLICATIONS%ROWTYPE
1186  |        p_rec_orig_app_id     IN NUMBER
1187  |        p_rec_app_id          IN NUMBER
1188  |        p_rec_unapp_id        IN NUMBER
1189  |        p_amt_due_remaining   IN NUMBER
1190  |
1191  |
1192  |  KNOWN ISSUES:
1193  |
1194  |  NOTES:
1195  |
1196  |  MODIFICATION HISTORY
1197  |  Date        Author                  Description of Change
1198  |  09/09/02    Debbie Sue Jancis       Created
1199  *============================================================================*/
1200 PROCEDURE rate_adj_insert_rec (
1201           p_app_ra_rec          IN AR_RECEIVABLE_APPLICATIONS%ROWTYPE,
1202           p_unapp_ra_rec        IN AR_RECEIVABLE_APPLICATIONS%ROWTYPE,
1203           p_rec_orig_app_id     IN NUMBER,
1204           p_rec_app_id          IN NUMBER,
1205           p_rec_unapp_id        IN NUMBER,
1206           p_amt_due_remaining   IN NUMBER)  IS
1207 BEGIN
1208 NULL;
1209 --   IF PG_DEBUG in ('Y', 'C') THEN
1210 --      arp_standard.debug( 'AR_MRC_ENGINE3.rate_adj_insert_rec(+)');
1211 --   END IF;
1215 
1212    /*-----------------------------------------------------------------+
1213     |  Dump the input parameters for debugging purposes               |
1214     +----------------------------------------------------------------*/
1216 --  IF PG_DEBUG in ('Y', 'C') THEN
1217 --     arp_standard.debug('rate_adj_insert_rec: ' || 'p_rec_orig_app_id:' || to_char(p_rec_orig_app_id ));
1218 --     arp_standard.debug('rate_adj_insert_rec: ' || 'p_rec_app_id :' || to_char(p_rec_app_id));
1219 --     arp_standard.debug('rate_adj_insert_rec: ' || 'p_rec_unapp_id :' || to_char(p_rec_unapp_id));
1220 --     arp_standard.debug('rate_adj_insert_rec: ' || 'p_amt_due_remaining :' || to_char(p_amt_due_remaining));
1221 --  END IF;
1222 
1223    /*-----------------------------------------------------------------+
1224     |  First we need to check if MRC is enabled.  If it is than we    |
1225     |  continue processing.  If it is not then we are finished.       |
1226     +-----------------------------------------------------------------*/
1227 --   IF PG_DEBUG in ('Y', 'C') THEN
1228 --      arp_standard.debug('rate_adj_insert_rec: ' || 'before checking to see if mrc is enabled..');
1229 --   END IF;
1230 --   IF (gl_ca_utility_pkg.mrc_enabled(
1231 --                    p_sob_id => ar_mc_info.primary_sob_id,
1232 --                    p_org_id => ar_mc_info.org_id,
1233 --                    p_appl_id => 222
1234 --                          ))  THEN
1235 --        IF PG_DEBUG in ('Y', 'C') THEN
1236 --           arp_standard.debug('rate_adj_insert_rec: ' || 'MRC is enabled...     ');
1237 --        END IF;
1238 --           BEGIN
1239 --                ar_mc_rec_apps_pkg.rate_adj_insert_rec(
1240 --                      p_app_ra_rec         => p_app_ra_rec,
1241 --                      p_unapp_ra_rec       => p_unapp_ra_rec,
1242 --                      p_rec_orig_app_id    => p_rec_orig_app_id,
1243 --                      p_rec_app_id         => p_rec_app_id,
1244 --                      p_rec_unapp_id       => p_rec_unapp_id,
1245 --                      p_amt_due_remaining  => p_amt_due_remaining);
1246 --           EXCEPTION
1247 --            WHEN OTHERS THEN
1248 --              IF PG_DEBUG in ('Y', 'C') THEN
1249 --                 arp_standard.debug('error during MRC rate_adj_insert_rec ');
1250 --              END IF;
1251 --              APP_EXCEPTION.RAISE_EXCEPTION;
1252 --           END;
1253 
1254 --    END IF;  /* end of mrc is enabled */
1255 --  IF PG_DEBUG in ('Y', 'C') THEN
1256 --     arp_standard.debug( 'AR_MRC_ENGINE3.rate_adj_insert_rec(-)');
1257 --  END IF;
1258 
1259  END rate_adj_insert_rec;
1260 
1261 /*=============================================================================
1262  |  PUBLIC PROCEDURE  confirm_ra_rec_create
1263  |
1264  |  DESCRIPTION:
1265  |                This procedure will be called from
1266  |                ARP_confirmation
1267  |                to process the mrc data for insert.
1268  |
1269  |  CALLS PROCEDURES / FUNCTIONS (local to this package body)
1270  |
1271  |  PARAMETERS
1272  |        p_rec_record          IN arp_confirmation.new_con_data
1273  |
1274  |
1275  |  KNOWN ISSUES:
1276  |
1277  |  NOTES:
1278  |
1279  |
1280  |  MODIFICATION HISTORY
1281  |  Date        Author                  Description of Change
1282  |  09/16/02    Debbie Sue Jancis       Created
1283  *============================================================================*/
1284 PROCEDURE confirm_ra_rec_create(
1285           p_rec_record      IN ARP_CONFIRMATION.NEW_CON_DATA
1286                                )  IS
1287 BEGIN
1288 NULL;
1289 --   IF PG_DEBUG in ('Y', 'C') THEN
1290 --      arp_standard.debug( 'AR_MRC_ENGINE3.confirm_ra_rec_create(+)');
1291 --   END IF;
1292    /*-----------------------------------------------------------------+
1293     |  First we need to check if MRC is enabled.  If it is than we    |
1294     |  continue processing.  If it is not then we are finished.       |
1295     +-----------------------------------------------------------------*/
1296 --   IF PG_DEBUG in ('Y', 'C') THEN
1297 --      arp_standard.debug('confirm_ra_rec_create: ' || 'before checking to see if mrc is enabled..');
1298 --   END IF;
1299 --   IF (gl_ca_utility_pkg.mrc_enabled(
1300 --                    p_sob_id => ar_mc_info.primary_sob_id,
1301 --                    p_org_id => ar_mc_info.org_id,
1302 --                    p_appl_id => 222
1303 --                          ))  THEN
1304 --        IF PG_DEBUG in ('Y', 'C') THEN
1305 --           arp_standard.debug('confirm_ra_rec_create: ' || 'MRC is enabled...     ');
1306 --        END IF;
1307 --           BEGIN
1308 --                ar_mc_rec_apps_pkg.confirm_ra_rec_create(
1309 --                      p_rec_record  => p_rec_record );
1310 --           EXCEPTION
1311 --            WHEN OTHERS THEN
1312 --              IF PG_DEBUG in ('Y', 'C') THEN
1313 --                 arp_standard.debug('error during MRC confirm_ra_rec_create ');
1314 --              END IF;
1315 --              APP_EXCEPTION.RAISE_EXCEPTION;
1316 --           END;
1317 
1318 --    END IF;  /* end of mrc is enabled */
1319 --  IF PG_DEBUG in ('Y', 'C') THEN
1320 --     arp_standard.debug( 'AR_MRC_ENGINE3.confirm_ra_rec_create(-)');
1321 --  END IF;
1322 
1323  END confirm_ra_rec_create;
1324 
1325 /*=============================================================================
1326  |  PUBLIC PROCEDURE  update_ra_rec_cash_diff
1327  |
1328  |  DESCRIPTION:
1329  |                This procedure will be called from
1333  |
1330  |                ARP_PROC_RECEIPTS1
1331  |                to process the mrc data for receivable applications
1332  |                this was created for bug 2576372.
1334  |  CALLS PROCEDURES / FUNCTIONS (local to this package body)
1335  |
1336  |  PARAMETERS
1337  |        p_rec_app_id          IN NUMBER,
1338  |        p_cash_Receipt_id     IN ar_cash_Receipts.cash_Receipt_id%type
1339  |        p_diff_amount         IN ar_cash_Receipts.amount%TYPE
1340  |        p_old_rcpt_amount     IN ar_cash_Receipts.amount%TYPE
1341  |        p_payment_schedule_id IN ar_payment_schedules.payment_schedule_id%TYPE
1342  |
1343  |
1344  |  KNOWN ISSUES:
1345  |
1346  |  NOTES:
1347  |
1348  |
1349  |  MODIFICATION HISTORY
1350  |  Date        Author                  Description of Change
1351  |  09/20/02    Debbie Sue Jancis       Created
1352  *============================================================================*/
1353 PROCEDURE update_ra_rec_cash_diff(
1354        p_rec_app_id          IN NUMBER,
1355        p_cash_receipt_id     IN ar_cash_receipts.cash_receipt_id%TYPE,
1356        p_diff_amount         IN ar_cash_receipts.amount%TYPE,
1357        p_old_rcpt_amount     IN ar_cash_receipts.amount%TYPE,
1358        p_payment_schedule_id IN ar_payment_schedules.payment_schedule_id%TYPE
1359                                  ) IS
1360 BEGIN
1361 NULL;
1362 --   IF PG_DEBUG in ('Y', 'C') THEN
1363 --      arp_standard.debug( 'AR_MRC_ENGINE3.update_ra_rec_cash_diff(+)');
1364 --      arp_standard.debug('update_ra_rec_cash_diff: ' ||  'rec app id = ' || to_char(p_rec_app_id));
1365 --      arp_standard.debug('update_ra_rec_cash_diff: ' ||  'cash receipt id = ' || to_char(p_cash_receipt_id));
1366 --      arp_standard.debug('update_ra_rec_cash_diff: ' ||  'diff amount = ' || to_char(p_diff_amount));
1367 --      arp_standard.debug('update_ra_rec_cash_diff: ' ||  'old rcpt amount = ' || to_char(p_old_rcpt_amount));
1368 --      arp_standard.debug('update_ra_rec_cash_diff: ' ||  'ps id = ' || to_char(p_payment_schedule_id));
1369 --   END IF;
1370 
1371    /*-----------------------------------------------------------------+
1372     |  First we need to check if MRC is enabled.  If it is than we    |
1373     |  continue processing.  If it is not then we are finished.       |
1374     +-----------------------------------------------------------------*/
1375 --   IF PG_DEBUG in ('Y', 'C') THEN
1376 --      arp_standard.debug('update_ra_rec_cash_diff: ' || 'before checking to see if mrc is enabled..');
1377 --   END IF;
1378 --   IF (gl_ca_utility_pkg.mrc_enabled(
1379 --                    p_sob_id => ar_mc_info.primary_sob_id,
1380 --                    p_org_id => ar_mc_info.org_id,
1381 --                    p_appl_id => 222
1382 --                          ))  THEN
1383 --        IF PG_DEBUG in ('Y', 'C') THEN
1384 --           arp_standard.debug('update_ra_rec_cash_diff: ' || 'MRC is enabled...     ');
1385 --        END IF;
1386 --           BEGIN
1387 --                ar_mc_rec_apps_pkg.update_ra_rec_cash_diff(
1388 --                       p_rec_app_id          => p_rec_app_id,
1389 --                       p_cash_receipt_id     => p_cash_receipt_id,
1390 --                       p_diff_amount         => p_diff_amount,
1391 --                       p_old_rcpt_amount     => p_old_rcpt_amount,
1392 --                       p_payment_schedule_id => p_payment_schedule_id);
1393 
1394 --           EXCEPTION
1395 --            WHEN OTHERS THEN
1396 --              IF PG_DEBUG in ('Y', 'C') THEN
1397 --                 arp_standard.debug('error during MRC update_ra_rec_cash_diff ');
1398 --              END IF;
1399 --              APP_EXCEPTION.RAISE_EXCEPTION;
1400 --           END;
1401 
1402 --    END IF;  /* end of mrc is enabled */
1403 
1404 --   IF PG_DEBUG in ('Y', 'C') THEN
1405 --      arp_standard.debug( 'AR_MRC_ENGINE3.update_ra_rec_cash_diff(-)');
1406 --   END IF;
1407 
1408 END update_ra_rec_cash_diff;
1409 
1410 END AR_MRC_ENGINE3;