DBA Data[Home] [Help]

APPS.JAI_CMN_REVERSE_CHARGE_PKG dependencies on JAI_GENERAL_PKG

Line 327: lv_codepath := jai_general_pkg.plot_codepath(1,

323: fnd_file.put_line(fnd_file.log,
324: 'Enter Reverse Charge Process. start');
325: END IF;
326:
327: lv_codepath := jai_general_pkg.plot_codepath(1,
328: lv_codepath,
329: 'PROCESS_PAYMENT',
330: 'START');
331: FOR invo IN c_batch_references(pn_batch_id, jai_constants.source_ap) LOOP

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

329: 'PROCESS_PAYMENT',
330: 'START');
331: FOR invo IN c_batch_references(pn_batch_id, jai_constants.source_ap) LOOP
332: ln_invoice_id := invo.invoice_id;
333: lv_codepath := jai_general_pkg.plot_codepath(2, lv_codepath);
334: -- Logic to Process the PAST DATED PAYMENTS that are not processed due to Invoice Accounting did not happen
335: FOR inv_payment IN c_previous_payments_of_inv(ln_invoice_id,
336: p_trx_from_date) LOOP
337: lv_process_flag := null;

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

338: IF inv_payment.amount > 0 AND inv_payment.reversal_flag = 'Y' THEN
339: null;
340: else
341:
342: lv_codepath := jai_general_pkg.plot_codepath(3, lv_codepath);
343: get_org_location(ln_invoice_id,
344: inv_payment.invoice_line_number,
345: inv_payment.po_distribution_id,
346: l_organization_id,

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

351: l_location_id);
352:
353: IF inv_payment.accounting_date >= ld_st_accrual_date THEN
354:
355: lv_codepath := jai_general_pkg.plot_codepath(4, lv_codepath);
356: SAVEPOINT process_reverse_payment;
357:
358: process_charge_acct(pn_batch_id => pn_batch_id,
359: pn_regime_id => pn_regime_id,

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

389:
390: END LOOP; -- invoice payments
391:
392: FOR ppa IN c_previous_prepayment_app(ln_invoice_id, p_trx_from_date) LOOP
393: lv_codepath := jai_general_pkg.plot_codepath(9, lv_codepath);
394: ln_invoice_id := ppa.invoice_id;
395: get_org_location(ln_invoice_id,
396: ppa.invoice_line_number,
397: ppa.po_distribution_id,

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

402: l_organization_id,
403: l_location_id);
404:
405: IF ppa.accounting_date >= ld_st_accrual_date THEN
406: lv_codepath := jai_general_pkg.plot_codepath(10, lv_codepath);
407: SAVEPOINT process_reverse_payment;
408:
409: process_charge_acct(pn_batch_id => pn_batch_id,
410: pn_regime_id => pn_regime_id,

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

442:
443: FOR inv_payment IN c_period_payments(p_trx_from_date, p_trx_to_date) LOOP
444: lv_process_flag := null;
445: ln_invoice_id := inv_payment.invoice_id;
446: lv_codepath := jai_general_pkg.plot_codepath(5, lv_codepath);
447: get_org_location(ln_invoice_id,
448: inv_payment.invoice_line_number,
449: inv_payment.po_distribution_id,
450: l_organization_id,

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

455: l_location_id);
456:
457: IF inv_payment.accounting_date >= ld_st_accrual_date THEN
458:
459: lv_codepath := jai_general_pkg.plot_codepath(6, lv_codepath);
460: SAVEPOINT process_reverse_payment;
461:
462: process_charge_acct(pn_batch_id => pn_batch_id,
463: pn_regime_id => pn_regime_id,

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

491: END LOOP;
492:
493: FOR pp IN c_prepayment_applications(p_trx_from_date, p_trx_to_date) LOOP
494:
495: lv_codepath := jai_general_pkg.plot_codepath(7, lv_codepath);
496: ln_invoice_id := pp.invoice_id;
497:
498: IF g_debug = 'Y' THEN
499: FND_FILE.put_line(fnd_file.log,

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

513: l_organization_id,
514: l_location_id);
515: IF pp.accounting_date >= ld_st_accrual_date THEN
516:
517: lv_codepath := jai_general_pkg.plot_codepath(8, lv_codepath);
518: SAVEPOINT process_reverse_payment;
519:
520: process_charge_acct(pn_batch_id => pn_batch_id,
521: pn_regime_id => pn_regime_id,

Line 775: lv_codepath := jai_general_pkg.plot_codepath(1,

771: lv_curr_conv_type,
772: ld_transaction_date;
773: CLOSE get_curr_dtls_cur;
774:
775: lv_codepath := jai_general_pkg.plot_codepath(1,
776: lv_codepath,
777: 'PROCESS_CHARGE_ACCT',
778: 'START');
779: open c_total_inv_amount(pn_invoice_id);

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

808: */
809:
810: --ln_regime_id := pn_regime_id;
811: FOR lr_dist_line IN get_dist_line_cur LOOP
812: lv_codepath := jai_general_pkg.plot_codepath(2, lv_codepath);
813: OPEN c_reference(jai_constants.source_ap,
814: lr_dist_line.invoice_id,
815: lr_dist_line.invoice_distribution_id);
816: FETCH c_reference

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

828: r_ref.reference_id);
829: FETCH c_rgm_repository_id
830: INTO ln_rgm_reposotory_id;
831: CLOSE c_rgm_repository_id;
832: lv_codepath := jai_general_pkg.plot_codepath(3, lv_codepath);
833: -- if the following is satisfied, then it means the payment against the invoice is already processed
834: IF ln_rgm_reposotory_id IS NOT NULL THEN
835: p_process_flag := jai_constants.already_processed;
836: RETURN;

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

846: --Decide the source transaction type: REVERSE_PAI_ACCOUNTING, REVERSE_AVOID_ACCOUNTING,
847: --REVERSE_APPLY_ACCOUNTING, REVERSE_CHARGE_ACCOUNTING
848: IF pv_payment_table_name = jai_constants.ap_payments THEN
849:
850: lv_codepath := jai_general_pkg.plot_codepath(8, lv_codepath);
851: OPEN c_invoice_payment(pn_invoice_payment_id);
852: FETCH c_invoice_payment
853: INTO r_payment;
854: CLOSE c_invoice_payment;

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

854: CLOSE c_invoice_payment;
855:
856: IF r_payment.future_pay_due_date IS NOT NULL AND
857: r_payment.future_pay_due_date > trunc(sysdate) THEN
858: lv_codepath := jai_general_pkg.plot_codepath(9, lv_codepath);
859: p_process_flag := 'FP';
860: p_process_message := 'Future payment which is not yet matured';
861: FND_FILE.put_line(fnd_file.log, 'Codepath:' || lv_codepath);
862: RETURN;

Line 873: lv_codepath := jai_general_pkg.plot_codepath(10,

869:
870: -- To Derive Src Trx Type and Transaction Date for Normal Payment
871: IF r_payment.amount > 0 THEN
872: IF r_payment.future_pay_due_date IS NOT NULL THEN
873: lv_codepath := jai_general_pkg.plot_codepath(10,
874: lv_codepath);
875: lv_source_trx_type := jai_constants.payment;
876: ld_transaction_date := r_payment.future_pay_due_date;
877: ELSE

Line 878: lv_codepath := jai_general_pkg.plot_codepath(11,

874: lv_codepath);
875: lv_source_trx_type := jai_constants.payment;
876: ld_transaction_date := r_payment.future_pay_due_date;
877: ELSE
878: lv_codepath := jai_general_pkg.plot_codepath(11,
879: lv_codepath);
880: lv_source_trx_type := 'REVERSE_PAID_ACCOUNTING';
881: ld_transaction_date := r_payment.check_date;
882: END IF;

Line 887: lv_codepath := jai_general_pkg.plot_codepath(12,

883:
884: -- Void Case
885: ELSE
886: IF r_payment.void_date IS NOT NULL THEN
887: lv_codepath := jai_general_pkg.plot_codepath(12,
888: lv_codepath);
889: lv_source_trx_type := 'REVERSE_AVOID_ACCOUNTING';
890: ld_transaction_date := r_payment.void_date;
891: ELSE

Line 892: lv_codepath := jai_general_pkg.plot_codepath(13,

888: lv_codepath);
889: lv_source_trx_type := 'REVERSE_AVOID_ACCOUNTING';
890: ld_transaction_date := r_payment.void_date;
891: ELSE
892: lv_codepath := jai_general_pkg.plot_codepath(13,
893: lv_codepath);
894: lv_source_trx_type := jai_constants.payment_reversal;
895: ld_transaction_date := r_payment.check_date;
896: END IF;

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

897: END IF;
898:
899: ELSIF pv_payment_table_name = jai_constants.ap_prepayments THEN
900:
901: lv_codepath := jai_general_pkg.plot_codepath(14, lv_codepath);
902: OPEN c_invoice_distribution(pn_invoice_payment_id);
903: FETCH c_invoice_distribution
904: INTO r_prepayment;
905: CLOSE c_invoice_distribution;

Line 915: lv_codepath := jai_general_pkg.plot_codepath(15,

911: ld_transaction_date := trunc(r_prepayment.creation_date);
912:
913: -- if the following condition is satisfied, then it means a prepayment unapplication onto invoice
914: IF r_prepayment.parent_reversal_id IS NOT NULL THEN
915: lv_codepath := jai_general_pkg.plot_codepath(15,
916: lv_codepath);
917: lv_source_trx_type := 'REVERSE_UNAPPLY_ACCOUNTING';
918: ELSE
919: lv_codepath := jai_general_pkg.plot_codepath(16,

Line 919: lv_codepath := jai_general_pkg.plot_codepath(16,

915: lv_codepath := jai_general_pkg.plot_codepath(15,
916: lv_codepath);
917: lv_source_trx_type := 'REVERSE_UNAPPLY_ACCOUNTING';
918: ELSE
919: lv_codepath := jai_general_pkg.plot_codepath(16,
920: lv_codepath);
921: lv_source_trx_type := 'REVERSE_APPLY_ACCOUNTING';
922: END IF;
923:

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

926: -- Following condition is satisfied if the distribution tax line is reversal of a parent distribution tax line
927: IF r_dist.reversal_flag = 'Y' AND
928: r_dist.parent_reversal_id IS NOT NULL THEN
929:
930: lv_codepath := jai_general_pkg.plot_codepath(17, lv_codepath);
931: OPEN c_reference(jai_constants.source_ap,
932: pn_invoice_id,
933: r_dist.parent_reversal_id);
934: FETCH c_reference

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

946:
947: -- following elsif is added to take care of void scenarios, where in the recovered amt againt the main payment is reversed
948: ELSIF lv_source_trx_type = 'REVERSE_AVOID_ACCOUNTING'/*jai_constants.payment_voided*/ THEN --Modified by Junjian for bug#14459664 on 08-Aug-2012
949:
950: lv_codepath := jai_general_pkg.plot_codepath(18, lv_codepath);
951: OPEN c_repo_recovered_amt(jai_constants.source_ap,
952: pv_payment_table_name,
953: r_payment.reversal_inv_pmt_id,
954: r_ref.reference_id);

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

967: nvl(r_payment.amount, 1));
968:
969: -- following elsif is added to take care of Prepay Unapply scenarios, where in the recovered amt againt the main payment is reversed
970: ELSIF lv_source_trx_type = 'REVERSE_UNAPPLY_ACCOUNTING'/*jai_constants.prepay_unapplication*/ THEN --Modified by Junjian for bug#14459664 on 08-Aug-2012
971: lv_codepath := jai_general_pkg.plot_codepath(20, lv_codepath);
972: OPEN c_repo_recovered_amt(jai_constants.source_ap,
973: pv_payment_table_name,
974: r_prepayment.parent_reversal_id,
975: r_ref.reference_id);

Line 991: lv_codepath := jai_general_pkg.plot_codepath(22,

987: fetch c_get_inv_amount into r_dist.invoice_amount;
988: close c_get_inv_amount;
989: --Modified by Junjian for bug#14459664 on 13-Aug-2012 end
990: end if;
991: lv_codepath := jai_general_pkg.plot_codepath(22,
992: lv_codepath);
993: ln_recovered_amount := (abs(r_ref.recoverable_amount) *
994: ln_payment_amount) / r_dist.invoice_amount; -- CHK
995:

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

1001: r_payment.amount);
1002:
1003: END IF;
1004:
1005: lv_codepath := jai_general_pkg.plot_codepath(23, lv_codepath);
1006: ln_recovered_amount := nvl(ln_recovered_amount, 0);
1007: ln_discounted_amount := nvl(ln_discounted_amount, 0);
1008:
1009: ln_validate_amount := r_ref.recovered_amount +

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

1015: end if;
1016:
1017: IF r_ref.recoverable_amount > 0 AND
1018: ln_validate_amount > r_ref.recoverable_amount THEN
1019: lv_codepath := jai_general_pkg.plot_codepath(24, lv_codepath);
1020:
1021: ln_diff_amount := ln_validate_amount -
1022: r_ref.recoverable_amount;
1023: ln_discounted_amount := ln_discounted_amount -

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

1028: ln_validate_amount);
1029:
1030: ELSIF r_ref.recoverable_amount < 0 AND
1031: ln_validate_amount < r_ref.recoverable_amount THEN
1032: lv_codepath := jai_general_pkg.plot_codepath(25, lv_codepath);
1033:
1034: ln_diff_amount := ln_validate_amount -
1035: r_ref.recoverable_amount;
1036: ln_discounted_amount := ln_discounted_amount -

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

1051: ln_discounted_amount);
1052: END IF;
1053:
1054: IF ln_recovered_amount = 0 THEN
1055: lv_codepath := jai_general_pkg.plot_codepath(26, lv_codepath);
1056: IF g_debug = 'Y' THEN
1057: FND_FILE.put_line(fnd_file.log, 'Codepath:' || lv_codepath);
1058: fnd_file.put_line(fnd_file.log, 'Allready amount is recovered');
1059: END IF;

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

1078: ln_entered_amt := ln_recovered_amount;
1079: ln_accounted_amt := ln_entered_amt * nvl(r_payment.exchange_rate, 1);
1080:
1081: lv_account_name := jai_constants.liability_interim;
1082: lv_codepath := jai_general_pkg.plot_codepath(20, lv_codepath);
1083:
1084: jai_trx_repo_extract_pkg.get_doc_from_reference(p_reference_id => r_ref.reference_id,
1085: p_organization_id => ln_organization_id,
1086: p_location_id => ln_location_id,

Line 1091: lv_codepath := jai_general_pkg.plot_codepath(20.1, lv_codepath);

1087: p_service_type_code => lv_service_type_code,
1088: p_process_flag => lv_process_flag,
1089: p_process_message => lv_process_message);
1090: IF lv_process_flag <> jai_constants.successful THEN
1091: lv_codepath := jai_general_pkg.plot_codepath(20.1, lv_codepath);
1092: FND_FILE.put_line(fnd_file.log,
1093: 'Error Flag:' || lv_process_flag ||
1094: ' Error Message:' || lv_process_message);
1095: IF g_debug = 'Y' THEN

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

1099: END IF;
1100:
1101: IF nvl(ln_entered_amt, 0) <> 0 THEN
1102:
1103: lv_codepath := jai_general_pkg.plot_codepath(23, lv_codepath);
1104: jai_cmn_rgm_recording_pkg.insert_repository_entry(p_repository_id => ln_repository_id,
1105: p_regime_id => pn_regime_id,
1106: p_tax_type => lv_tax_type,
1107: p_organization_type => jai_constants.service_tax_orgn_type,

Line 1759: ln_currency_precision := jai_general_pkg.get_currency_precision(null);

1755: lv_message := 'Account not given';
1756: RAISE_APPLICATION_ERROR( -20011, lv_message);
1757: END IF;
1758:
1759: ln_currency_precision := jai_general_pkg.get_currency_precision(null);
1760: ln_entered_dr := round(p_entered_dr, ln_currency_precision);
1761: ln_entered_cr := round(p_entered_cr, ln_currency_precision);
1762: ln_accounted_dr := round(p_accounted_dr, ln_currency_precision);
1763: ln_accounted_cr := round(p_accounted_cr, ln_currency_precision);