DBA Data[Home] [Help]

APPS.JAI_CMN_RGM_PROCESSING_PKG dependencies on JAI_GENERAL_PKG

Line 319: lv_codepath := jai_general_pkg.plot_codepath(1,lv_codepath, 'PROCESS_PAYMENT', 'START');

315: lv_called_from VARCHAR2(100); --rchandan for bug#4428980
316:
317: BEGIN
318: g_debug := 'Y';
319: lv_codepath := jai_general_pkg.plot_codepath(1,lv_codepath, 'PROCESS_PAYMENT', 'START');
320:
321: -- Accounting check for the invoice_distribution, whether it is accounted or not
322: IF p_inv_accounting_chk_done = jai_constants.no THEN
323: OPEN c_invoice_distribution(p_inv_dist_id);

Line 327: lv_codepath := jai_general_pkg.plot_codepath(2, lv_codepath);

323: OPEN c_invoice_distribution(p_inv_dist_id);
324: FETCH c_invoice_distribution INTO r_dist;
325: CLOSE c_invoice_distribution;
326:
327: lv_codepath := jai_general_pkg.plot_codepath(2, lv_codepath);
328:
329: -- Following condition is true only if Invoice Distribution Accounting did not happen
330: IF r_dist.posted_flag IS NULL OR r_dist.posted_flag <> 'Y' THEN
331: lv_codepath := jai_general_pkg.plot_codepath(3, lv_codepath);

Line 331: lv_codepath := jai_general_pkg.plot_codepath(3, lv_codepath);

327: lv_codepath := jai_general_pkg.plot_codepath(2, lv_codepath);
328:
329: -- Following condition is true only if Invoice Distribution Accounting did not happen
330: IF r_dist.posted_flag IS NULL OR r_dist.posted_flag <> 'Y' THEN
331: lv_codepath := jai_general_pkg.plot_codepath(3, lv_codepath);
332: IF g_debug='Y' THEN
333: fnd_file.put_line(fnd_file.log,'AccntChkFail. InvId,LineNum,DisNum:'||r_dist.invoice_id||','
334: ||r_dist.invoice_line_number||','||r_dist.distribution_line_number);
335: END IF;

Line 349: lv_codepath := jai_general_pkg.plot_codepath(4, lv_codepath);

345: CLOSE c_reference;
346:
347: -- If the following if condition is satisfied, then it means there is no REFERENCE entry and thus no RECEOVERY should happen
348: IF r_ref.reference_id IS NULL THEN
349: lv_codepath := jai_general_pkg.plot_codepath(4, lv_codepath);
350: RETURN;
351: -- if the following is satisfied then it means this is a reversal of a parent line which is processed and hence should return back
352: ELSIF r_ref.reversal_flag = 'Y' THEN
353: lv_codepath := jai_general_pkg.plot_codepath(5, lv_codepath);

Line 353: lv_codepath := jai_general_pkg.plot_codepath(5, lv_codepath);

349: lv_codepath := jai_general_pkg.plot_codepath(4, lv_codepath);
350: RETURN;
351: -- if the following is satisfied then it means this is a reversal of a parent line which is processed and hence should return back
352: ELSIF r_ref.reversal_flag = 'Y' THEN
353: lv_codepath := jai_general_pkg.plot_codepath(5, lv_codepath);
354: p_process_flag := jai_constants.already_processed;
355: RETURN;
356: END IF;
357:

Line 366: lv_codepath := jai_general_pkg.plot_codepath(6, lv_codepath);

362: CLOSE c_rgm_repository_id;
363:
364: -- if the following is satisfied, then it means the payment against the invoice is already processed
365: IF ln_rgm_reposotory_id IS NOT NULL THEN
366: lv_codepath := jai_general_pkg.plot_codepath(6, lv_codepath);
367: p_process_flag := jai_constants.already_processed;
368: RETURN;
369: END IF;
370:

Line 371: lv_codepath := jai_general_pkg.plot_codepath(7, lv_codepath);

367: p_process_flag := jai_constants.already_processed;
368: RETURN;
369: END IF;
370:
371: lv_codepath := jai_general_pkg.plot_codepath(7, lv_codepath);
372: -- following will be true only in case Accounting Check for Invoice distribution is not done in calling procedure
373: IF r_dist.invoice_distribution_id IS NULL THEN
374: OPEN c_invoice_distribution(p_inv_dist_id);
375: FETCH c_invoice_distribution INTO r_dist;

Line 381: lv_codepath := jai_general_pkg.plot_codepath(8, lv_codepath);

377: END IF;
378:
379: IF p_payment_table_name = jai_constants.ap_payments THEN
380:
381: lv_codepath := jai_general_pkg.plot_codepath(8, lv_codepath);
382: OPEN c_invoice_payment(p_payment_document_id);
383: FETCH c_invoice_payment INTO r_payment;
384: CLOSE c_invoice_payment;
385:

Line 387: lv_codepath := jai_general_pkg.plot_codepath(9, lv_codepath);

383: FETCH c_invoice_payment INTO r_payment;
384: CLOSE c_invoice_payment;
385:
386: IF r_payment.future_pay_due_date IS NOT NULL AND r_payment.future_pay_due_date > trunc(sysdate) THEN
387: lv_codepath := jai_general_pkg.plot_codepath(9, lv_codepath);
388: p_process_flag := 'FP';
389: p_process_message := 'Future payment which is not yet matured';
390: RETURN;
391: END IF;

Line 401: lv_codepath := jai_general_pkg.plot_codepath(10, lv_codepath);

397:
398: -- To Derive Src Trx Type and Transaction Date for Normal Payment
399: IF r_payment.amount > 0 THEN
400: IF r_payment.future_pay_due_date IS NOT NULL THEN
401: lv_codepath := jai_general_pkg.plot_codepath(10, lv_codepath);
402: lv_src_trx_type := jai_constants.future_payment;
403: ld_transaction_date := r_payment.future_pay_due_date;
404: ELSE
405: lv_codepath := jai_general_pkg.plot_codepath(11, lv_codepath);

Line 405: lv_codepath := jai_general_pkg.plot_codepath(11, lv_codepath);

401: lv_codepath := jai_general_pkg.plot_codepath(10, lv_codepath);
402: lv_src_trx_type := jai_constants.future_payment;
403: ld_transaction_date := r_payment.future_pay_due_date;
404: ELSE
405: lv_codepath := jai_general_pkg.plot_codepath(11, lv_codepath);
406: lv_src_trx_type := jai_constants.payment;
407: ld_transaction_date := r_payment.check_date;
408: END IF;
409:

Line 413: lv_codepath := jai_general_pkg.plot_codepath(12, lv_codepath);

409:
410: -- Void Case
411: ELSE
412: IF r_payment.void_date IS NOT NULL THEN
413: lv_codepath := jai_general_pkg.plot_codepath(12, lv_codepath);
414: lv_src_trx_type := jai_constants.payment_voided;
415: ld_transaction_date := r_payment.void_date;
416: ELSE
417: lv_codepath := jai_general_pkg.plot_codepath(13, lv_codepath);

Line 417: lv_codepath := jai_general_pkg.plot_codepath(13, lv_codepath);

413: lv_codepath := jai_general_pkg.plot_codepath(12, lv_codepath);
414: lv_src_trx_type := jai_constants.payment_voided;
415: ld_transaction_date := r_payment.void_date;
416: ELSE
417: lv_codepath := jai_general_pkg.plot_codepath(13, lv_codepath);
418: lv_src_trx_type := jai_constants.payment_reversal;
419: ld_transaction_date := r_payment.check_date;
420: END IF;
421: END IF;

Line 425: lv_codepath := jai_general_pkg.plot_codepath(14, lv_codepath);

421: END IF;
422:
423: ELSIF p_payment_table_name = jai_constants.ap_prepayments THEN
424:
425: lv_codepath := jai_general_pkg.plot_codepath(14, lv_codepath);
426: OPEN c_invoice_distribution(p_payment_document_id);
427: FETCH c_invoice_distribution INTO r_prepayment;
428: CLOSE c_invoice_distribution;
429:

Line 438: lv_codepath := jai_general_pkg.plot_codepath(15, lv_codepath);

434: ld_transaction_date := trunc(r_prepayment.creation_date);
435:
436: -- if the following condition is satisfied, then it means a prepayment unapplication onto invoice
437: IF r_prepayment.parent_reversal_id IS NOT NULL THEN
438: lv_codepath := jai_general_pkg.plot_codepath(15, lv_codepath);
439: lv_src_trx_type := jai_constants.prepay_unapplication;
440: ELSE
441: lv_codepath := jai_general_pkg.plot_codepath(16, lv_codepath);
442: lv_src_trx_type := jai_constants.prepay_application;

Line 441: lv_codepath := jai_general_pkg.plot_codepath(16, lv_codepath);

437: IF r_prepayment.parent_reversal_id IS NOT NULL THEN
438: lv_codepath := jai_general_pkg.plot_codepath(15, lv_codepath);
439: lv_src_trx_type := jai_constants.prepay_unapplication;
440: ELSE
441: lv_codepath := jai_general_pkg.plot_codepath(16, lv_codepath);
442: lv_src_trx_type := jai_constants.prepay_application;
443: END IF;
444:
445: END IF;

Line 453: lv_codepath := jai_general_pkg.plot_codepath(17, lv_codepath);

449:
450: -- Following condition is satisfied if the distribution tax line is reversal of a parent distribution tax line
451: IF r_dist.reversal_flag = 'Y' AND r_dist.parent_reversal_id IS NOT NULL THEN
452:
453: lv_codepath := jai_general_pkg.plot_codepath(17, lv_codepath);
454: OPEN c_reference(p_source, p_invoice_id, r_dist.parent_reversal_id);
455: FETCH c_reference INTO r_parent_ref;
456: CLOSE c_reference;
457:

Line 471: lv_codepath := jai_general_pkg.plot_codepath(18, lv_codepath);

467:
468: -- following elsif is added to take care of void scenarios, where in the recovered amt againt the main payment is reversed
469: ELSIF lv_src_trx_type = jai_constants.payment_voided THEN
470:
471: lv_codepath := jai_general_pkg.plot_codepath(18, lv_codepath);
472: OPEN c_repo_recovered_amt(p_source, p_payment_table_name, r_payment.reversal_inv_pmt_id, r_ref.reference_id);
473: FETCH c_repo_recovered_amt INTO ln_parent_recovered_amt;
474: CLOSE c_repo_recovered_amt;
475:

Line 486: lv_codepath := jai_general_pkg.plot_codepath(20, lv_codepath);

482: ln_discounted_amount := -ln_parent_recovered_amt * ( nvl(r_payment.discount_taken,0)/nvl(r_payment.amount,1) );
483:
484: -- following elsif is added to take care of Prepay Unapply scenarios, where in the recovered amt againt the main payment is reversed
485: ELSIF lv_src_trx_type = jai_constants.prepay_unapplication THEN
486: lv_codepath := jai_general_pkg.plot_codepath(20, lv_codepath);
487: OPEN c_repo_recovered_amt(p_source, p_payment_table_name, r_prepayment.parent_reversal_id, r_ref.reference_id);
488: FETCH c_repo_recovered_amt INTO ln_parent_recovered_amt;
489: CLOSE c_repo_recovered_amt;
490:

Line 497: lv_codepath := jai_general_pkg.plot_codepath(22, lv_codepath);

493: ELSE
494: IF r_dist.invoice_amount = 0 THEN
495: r_dist.invoice_amount := 1;
496: end if;
497: lv_codepath := jai_general_pkg.plot_codepath(22, lv_codepath);
498: ln_recovered_amount := (r_ref.recoverable_amount * ln_payment_amount) / r_dist.invoice_amount; -- CHK
499:
500: /* Discount is considered only for payments and not for prepayments */
501: if r_payment.amount = 0 THEN

Line 514: lv_codepath := jai_general_pkg.plot_codepath(23, lv_codepath);

510: ||', PaymtAmt:'||ln_payment_amount||', InvAmt:'||r_dist.invoice_amount||', DiscTaken:'||r_payment.discount_taken
511: ||', rPayAmt:'||r_payment.amount||', DiscRecoAmt:'||ln_discounted_amount);
512: END IF;
513:
514: lv_codepath := jai_general_pkg.plot_codepath(23, lv_codepath);
515: ln_recovered_amount := nvl(ln_recovered_amount, 0);
516: ln_discounted_amount := nvl(ln_discounted_amount, 0);
517:
518: ln_validate_amount := r_ref.recovered_amount + r_ref.discounted_amount + ln_recovered_amount + ln_discounted_amount;

Line 526: lv_codepath := jai_general_pkg.plot_codepath(24, lv_codepath);

522: end if;
523:
524:
525: IF r_ref.recoverable_amount > 0 AND ln_validate_amount > r_ref.recoverable_amount THEN
526: lv_codepath := jai_general_pkg.plot_codepath(24, lv_codepath);
527:
528: ln_diff_amount := ln_validate_amount - r_ref.recoverable_amount;
529: ln_discounted_amount := ln_discounted_amount - (ln_discounted_amount * ln_diff_amount / ln_validate_amount);
530: ln_recovered_amount := ln_recovered_amount - (ln_recovered_amount * ln_diff_amount / ln_validate_amount);

Line 534: lv_codepath := jai_general_pkg.plot_codepath(25, lv_codepath);

530: ln_recovered_amount := ln_recovered_amount - (ln_recovered_amount * ln_diff_amount / ln_validate_amount);
531: --ln_recovered_amount := r_ref.recoverable_amount - r_ref.recovered_amount;
532:
533: ELSIF r_ref.recoverable_amount < 0 AND ln_validate_amount < r_ref.recoverable_amount THEN
534: lv_codepath := jai_general_pkg.plot_codepath(25, lv_codepath);
535:
536: ln_diff_amount := ln_validate_amount - r_ref.recoverable_amount;
537: ln_discounted_amount := ln_discounted_amount - (ln_discounted_amount * ln_diff_amount / ln_validate_amount);
538: ln_recovered_amount := ln_recovered_amount - (ln_recovered_amount * ln_diff_amount / ln_validate_amount);

Line 549: lv_codepath := jai_general_pkg.plot_codepath(26, lv_codepath);

545: ||', RecoAmt:'||ln_recovered_amount||', DiscRecoAmt:'||ln_discounted_amount);
546: END IF;
547:
548: IF ln_recovered_amount = 0 THEN
549: lv_codepath := jai_general_pkg.plot_codepath(26, lv_codepath);
550: IF g_debug='Y' THEN
551: fnd_file.put_line(fnd_file.log,'Allready amount is recovered');
552: END IF;
553: RETURN;

Line 568: lv_codepath := jai_general_pkg.plot_codepath(27.1, lv_codepath);

564: p_process_message => lv_process_message
565: );
566:
567: IF lv_process_flag <> jai_constants.successful THEN
568: lv_codepath := jai_general_pkg.plot_codepath(27.1, lv_codepath);
569: FND_FILE.put_line(fnd_file.log, 'Error Flag:'||lv_process_flag||' Error Message:'||lv_process_message);
570: return;
571: END IF;
572: /*Bug 5879769 bduvarag End*/

Line 573: lv_codepath := jai_general_pkg.plot_codepath(27, lv_codepath);

569: FND_FILE.put_line(fnd_file.log, 'Error Flag:'||lv_process_flag||' Error Message:'||lv_process_message);
570: return;
571: END IF;
572: /*Bug 5879769 bduvarag End*/
573: lv_codepath := jai_general_pkg.plot_codepath(27, lv_codepath);
574: lv_called_from := 'AP_PROCESSING';--rchandan for bug#4428980
575: jai_cmn_rgm_recording_pkg.insert_repository_entry(
576: p_repository_id => ln_rgm_reposotory_id,
577: p_regime_id => p_regime_id,

Line 616: lv_codepath := jai_general_pkg.plot_codepath(28, lv_codepath);

612: p_curr_conv_rate => null
613: );
614:
615: IF p_process_flag <> jai_constants.successful THEN
616: lv_codepath := jai_general_pkg.plot_codepath(28, lv_codepath);
617: RETURN;
618: END IF;
619:
620: jai_cmn_rgm_recording_pkg.update_reference(

Line 630: lv_codepath := jai_general_pkg.plot_codepath(49, lv_codepath, 'PROCESS_PAYMENT', 'END');

626: p_process_message => p_process_message
627: );
628:
629: <>
630: lv_codepath := jai_general_pkg.plot_codepath(49, lv_codepath, 'PROCESS_PAYMENT', 'END');
631:
632: IF g_debug = 'Y' THEN
633: FND_FILE.put_line( fnd_file.log, 'Codepath:'||lv_codepath);
634: END IF;