DBA Data[Home] [Help]

APPS.JAI_AP_DTC_CANCELLATION_PKG dependencies on JAI_GENERAL_PKG

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

265: ln_dbg_level NUMBER := FND_LOG.g_current_runtime_level;
266:
267: BEGIN
268:
269: lv_codepath := jai_general_pkg.plot_codepath(1,
270: lv_codepath,
271: 'jai_ap_dtc_cancellation_pkg.process_invoice_cancellation',
272: 'START'); /* 1 */
273: --Fnd_File.put_line(Fnd_File.LOG,

Line 289: lv_codepath := jai_general_pkg.plot_codepath(1.0, lv_codepath); /* 1.0 */

285: p_new_transaction => lv_new_transaction);
286:
287: if nvl(lv_new_transaction, 'N') = 'N' then
288: /* Invoice was created before application of TDS clean up, need to call the old procedure */
289: lv_codepath := jai_general_pkg.plot_codepath(1.0, lv_codepath); /* 1.0 */
290: --Fnd_File.put_line(Fnd_File.LOG,
291: -- '**** Transaction before application of TDS clean up Calling procedure ****');
292: --Fnd_File.put_line(Fnd_File.LOG,
293: -- ' Invoking OLD procedure jai_ap_tds_old_pkg.cancel_invoice');

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

323: close c_ap_invoices_all;
324:
325: --Removed the code from here by Lakshmi Gopalsami for Bug#5131075(5193852)
326:
327: lv_codepath := jai_general_pkg.plot_codepath(2, lv_codepath); /* 2 */
328:
329: /* Get all the TDS invoices that were generated at the time of the INVOICE VALIDATE */
330: FOR cur_rec in c_jai_ap_tds_thhold_trxs(p_invoice_id) LOOP
331: --Fnd_File.put_line(Fnd_File.LOG, ' Inside Loop');

Line 395: lv_codepath := jai_general_pkg.plot_codepath(3, lv_codepath); /* 3 */

391: (cur_rec.tds_event LIKE 'THRESHOLD TRANSITION%') OR
392: (cur_rec.tds_event = 'SURCHARGE_CALCULATE' AND
393: ln_threshold_slab_id_before <> ln_threshold_slab_id_after) THEN
394:
395: lv_codepath := jai_general_pkg.plot_codepath(3, lv_codepath); /* 3 */
396:
397: lv_tds_invoice_flag := null;
398: lv_tds_invoice_message := null;
399: lv_tds_credit_memo_flag := null;

Line 439: lv_codepath := jai_general_pkg.plot_codepath(4,

435: end if;
436:
437: /* Check if the TDS invoice is paid, no processing is required if it is already paid. */
438: if r_ap_invoices_all.payment_status_flag <> 'N' then
439: lv_codepath := jai_general_pkg.plot_codepath(4,
440: lv_codepath); /* 4 */
441: lv_tds_invoice_flag := 'X';
442: lv_tds_invoice_message := 'Invoice to TDS Authority is already paid.';
443: lv_tds_credit_memo_flag := 'X';

Line 450: lv_codepath := jai_general_pkg.plot_codepath(5, lv_codepath); /* 5 */

446: end if;
447:
448: /* Check if the invoice to TDS authority is already canccelled,
449: if yes, no need to do the cancel processing of the invoice */
450: lv_codepath := jai_general_pkg.plot_codepath(5, lv_codepath); /* 5 */
451: if r_ap_invoices_all.cancelled_date is not null then
452: lv_codepath := jai_general_pkg.plot_codepath(6,
453: lv_codepath); /* 6 */
454: lv_tds_invoice_flag := 'X';

Line 452: lv_codepath := jai_general_pkg.plot_codepath(6,

448: /* Check if the invoice to TDS authority is already canccelled,
449: if yes, no need to do the cancel processing of the invoice */
450: lv_codepath := jai_general_pkg.plot_codepath(5, lv_codepath); /* 5 */
451: if r_ap_invoices_all.cancelled_date is not null then
452: lv_codepath := jai_general_pkg.plot_codepath(6,
453: lv_codepath); /* 6 */
454: lv_tds_invoice_flag := 'X';
455: lv_tds_invoice_message := ' Invoice to TDS Authority is already Cancelled.';
456: goto credit_memo_processing;

Line 475: lv_codepath := jai_general_pkg.plot_codepath(7, lv_codepath); /* 7 */

471: ln_out_original_prepay_amount := null;
472: ln_out_pay_curr_inv_amount := null;
473: lv_token := null;
474:
475: lv_codepath := jai_general_pkg.plot_codepath(7, lv_codepath); /* 7 */
476:
477: /* Start for Bug#5131075(5193852). Added by Lakshmi Gopalsami.
478: | Fetch the accounting date of TDS invoice distribution
479: | so that the same will be passed for reversal line which will get

Line 487: lv_codepath := jai_general_pkg.plot_codepath(1.1, lv_codepath); /* 1.1 */

483: lv_open_period := ap_utilities_pkg.get_current_gl_date(P_Date => ld_accounting_date,
484: P_Org_Id => r_ap_invoices_all.org_id);
485: if lv_open_period is null then
486:
487: lv_codepath := jai_general_pkg.plot_codepath(1.1, lv_codepath); /* 1.1 */
488:
489: ap_utilities_pkg.get_open_gl_date(p_date => ld_accounting_date, /* In date */
490: p_period_name => lv_open_period, /* out Period */
491: p_gl_date => ld_out_accounting_date, /* out date */--Updated by Chong for ZX investigation 20120816

Line 496: lv_codepath := jai_general_pkg.plot_codepath(1.2,

492: P_Org_Id => r_ap_invoices_all.org_id);
493:
494: /*Commented by Chong for ZX investigation 20120816
495: if lv_open_period is null then
496: lv_codepath := jai_general_pkg.plot_codepath(1.2,
497: lv_codepath); \* 1.2 *\
498: lv_process_flag := 'E';
499: lv_process_message := 'No open accounting Period after : ' ||
500: ld_accounting_date;

Line 555: lv_codepath := jai_general_pkg.plot_codepath(8, lv_codepath); /* 8 */

551: P_pay_curr_invoice_amount => ln_out_pay_curr_inv_amount,
552: P_Token => lv_token,
553: P_calling_sequence => 'India Localization - cancel TDS invoice');
554:
555: lv_codepath := jai_general_pkg.plot_codepath(8, lv_codepath); /* 8 */
556:
557: /* Bug4523064. Check whether any value is returned in lv_token.
558: IF it is not null display the error message. */
559:

Line 587: lv_codepath := jai_general_pkg.plot_codepath(9, lv_codepath); /* 9 */

583: /*What if ap_cancel_pkg.ap_cancel_single_invoice is not there ?? */
584: lv_tds_invoice_flag := 'Y';
585: lv_tds_invoice_message := 'Invoice to TDS Authority is Cancelled ';
586:
587: lv_codepath := jai_general_pkg.plot_codepath(9, lv_codepath); /* 9 */
588:
589: <>
590: /* Get the details of the Credit memo to the supplier for TDS */
591: r_ap_invoices_all := null;

Line 620: lv_codepath := jai_general_pkg.plot_codepath(10, lv_codepath); /* 10 */

616: /* Check if the Credit memo to the supplier for TDS already canccelled,
617: if yes, no need to cancel it again here */
618:
619: if r_ap_invoices_all.cancelled_date is not null then
620: lv_codepath := jai_general_pkg.plot_codepath(10, lv_codepath); /* 10 */
621: lv_tds_credit_memo_flag := 'X';
622: lv_tds_credit_memo_message := 'Credit memo to the supplier for TDS is already Cancelled.';
623: goto Continue_with_next_record;
624: end if;

Line 630: lv_codepath := jai_general_pkg.plot_codepath(11, lv_codepath); /* 11 */

626: /* Check if the Credit memo to the supplier for TDS is paid,
627: if yes a separate invoice needs to be generated, or else the same credit memo can be cancelled */
628:
629: if r_ap_invoices_all.payment_status_flag = 'N' then
630: lv_codepath := jai_general_pkg.plot_codepath(11, lv_codepath); /* 11 */
631: /* Credit memo not paid, can cancel the same */
632: lv_tds_credit_memo_flag := 'Y';
633: lv_tds_credit_memo_message := 'Cancelling Credit memo to the supplier for TDS as it is not paid ';
634:

Line 649: lv_codepath := jai_general_pkg.plot_codepath(12, lv_codepath); /* 12 */

645: ln_out_original_prepay_amount := null;
646: ln_out_pay_curr_inv_amount := null;
647: lv_token := NULL;
648:
649: lv_codepath := jai_general_pkg.plot_codepath(12, lv_codepath); /* 12 */
650:
651: /* Start for Bug#5131075(5193852). Added by Lakshmi Gopalsami.
652: | Fetch the accounting date of TDS invoice distribution
653: | so that the same will be passed for reversal line which will get

Line 662: lv_codepath := jai_general_pkg.plot_codepath(1.1, lv_codepath); /* 1.1 */

658: P_Org_Id => r_ap_invoices_all.org_id);
659:
660: if lv_open_period is null then
661:
662: lv_codepath := jai_general_pkg.plot_codepath(1.1, lv_codepath); /* 1.1 */
663:
664: ap_utilities_pkg.get_open_gl_date(p_date => ld_accounting_date, /* In date */
665: p_period_name => lv_open_period, /* out Period */
666: p_gl_date => ld_out_accounting_date, /* out date */ ----Updated by Chong for ZX investigation 20120816

Line 671: lv_codepath := jai_general_pkg.plot_codepath(1.2,

667: P_Org_Id => r_ap_invoices_all.org_id);
668:
669: /*Commented by Chong for ZX investigation 20120816
670: if lv_open_period is null then
671: lv_codepath := jai_general_pkg.plot_codepath(1.2,
672: lv_codepath); \* 1.2 *\
673: lv_process_flag := 'E';
674: lv_process_message := 'No open accounting Period after : ' ||
675: ld_accounting_date;

Line 730: lv_codepath := jai_general_pkg.plot_codepath(13, lv_codepath); /* 13 */

726: P_pay_curr_invoice_amount => ln_out_pay_curr_inv_amount,
727: P_token => lv_token,
728: P_calling_sequence => 'India Localization - cancel TDS invoice');
729:
730: lv_codepath := jai_general_pkg.plot_codepath(13, lv_codepath); /* 13 */
731:
732: /* Bug4523064. Check whether any value is returned in lv_token.
733: IF it is not null display the error message. */
734:

Line 758: lv_codepath := jai_general_pkg.plot_codepath(14,

754: where invoice_id = cur_rec.invoice_to_vendor_id;
755:
756: else
757: /* Credit memo has already been paid, have to generate a new invoice to nagate the effect */
758: lv_codepath := jai_general_pkg.plot_codepath(14,
759: lv_codepath); /* 14 */
760: ln_threshold_trx_id := 0;
761: lv_invoice_to_tds_num := null;
762: lv_invoice_to_vendor_num := null;

Line 789: lv_codepath := jai_general_pkg.plot_codepath(15, lv_codepath); /* 15 */

785: pd_creation_Date => sysdate,
786: pn_calc_tax_amount => 0);
787:
788: if lv_tds_credit_memo_flag = 'E' then
789: lv_codepath := jai_general_pkg.plot_codepath(15, lv_codepath); /* 15 */
790: goto Continue_with_next_record;
791: end if;
792:
793: lv_tds_credit_memo_flag := 'Y';

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

792:
793: lv_tds_credit_memo_flag := 'Y';
794: lv_tds_credit_memo_message := 'Generated Standard invoice to suppliet : ' ||
795: lv_invoice_to_vendor_num;
796: lv_codepath := jai_general_pkg.plot_codepath(16,
797: lv_codepath); /* 16 */
798:
799: if ln_start_threshold_trx_id is null then
800: ln_start_threshold_trx_id := ln_threshold_trx_id;

Line 803: lv_codepath := jai_general_pkg.plot_codepath(17, lv_codepath); /* 17 */

799: if ln_start_threshold_trx_id is null then
800: ln_start_threshold_trx_id := ln_threshold_trx_id;
801: end if;
802:
803: lv_codepath := jai_general_pkg.plot_codepath(17, lv_codepath); /* 17 */
804: /* Update the total tax amount for which Cancel invoice was raised */
805:
806: end if; /* Credit memo to the supplier paid / not paid */
807:

Line 824: lv_codepath := jai_general_pkg.plot_codepath(18, lv_codepath); /* 18 */

820: p_codepath => lv_codepath);
821:
822: <>
823:
824: lv_codepath := jai_general_pkg.plot_codepath(18, lv_codepath); /* 18 */
825: /* Update threshold for the cancel invoice amount */
826:
827: ln_threshold_grp_id := cur_rec.threshold_grp_id; /*added by rchandan for bug#5131075(4947469)*/
828:

Line 840: lv_codepath := jai_general_pkg.plot_codepath(19, lv_codepath); /* 19 */

836: P_process_message => lv_process_message,
837: p_codepath => lv_codepath);
838:
839: /* insert into JAI_AP_TDS_INV_CANCELS */
840: lv_codepath := jai_general_pkg.plot_codepath(19, lv_codepath); /* 19 */
841:
842: --fnd_file.put_line(FND_FILE.LOG, 'Insert cancel: p_invoice_id' || p_invoice_id);
843: IF ( ln_proc_level >= ln_dbg_level)
844: THEN

Line 957: lv_codepath := jai_general_pkg.plot_codepath(20, lv_codepath); /* 20 */

953:
954: /* Process Cases where TDS invoice was not generated because of threshold not being reached. */
955:
956: /* Get the exchange rate of the invoice, may be required for taxable_amount in INR for foreign currency */
957: lv_codepath := jai_general_pkg.plot_codepath(20, lv_codepath); /* 20 */
958: open c_get_parent_inv_dtls(p_invoice_id);
959: fetch c_get_parent_inv_dtls
960: into r_get_parent_inv_dtls;
961: close c_get_parent_inv_dtls;

Line 970: lv_codepath := jai_general_pkg.plot_codepath(21, lv_codepath); /* 21 */

966: close c_gl_sets_of_books;
967:
968: if r_gl_sets_of_books.currency_code <>
969: r_get_parent_inv_dtls.invoice_currency_code then
970: lv_codepath := jai_general_pkg.plot_codepath(21, lv_codepath); /* 21 */
971: /* Foreign currency invoice */
972: ln_exchange_rate := r_get_parent_inv_dtls.exchange_rate;
973: end if;
974:

Line 975: lv_codepath := jai_general_pkg.plot_codepath(22, lv_codepath); /* 22 */

971: /* Foreign currency invoice */
972: ln_exchange_rate := r_get_parent_inv_dtls.exchange_rate;
973: end if;
974:
975: lv_codepath := jai_general_pkg.plot_codepath(22, lv_codepath); /* 22 */
976: ln_exchange_rate := nvl(ln_exchange_rate, 1);
977: /*ETDS FVU3.1 Bug#11896260*/
978: /*To check the invoices for which the TDS has not been deducted as threshold is not breached and same threshold having crossed with another invoice and is paid.*/
979: /*Commented by Chong for ZX investigation 20120816

Line 1018: lv_codepath := jai_general_pkg.plot_codepath(23, lv_codepath); /* 23 */

1014: , GV_MODULE_PREFIX ||'.'|| lv_proc_name
1015: , 'outer Loop'
1016: );
1017: END IF; --( ln_proc_level >= ln_dbg_level)
1018: lv_codepath := jai_general_pkg.plot_codepath(23, lv_codepath); /* 23 */
1019: ln_threshold_grp_id := null;
1020: r_ja_in_tax_codes := null;
1021: ln_taxable_amount := null;
1022:

Line 1034: lv_codepath := jai_general_pkg.plot_codepath(24, lv_codepath); \* 24 *\

1030: into r_ja_in_tax_codes;
1031: close c_ja_in_tax_codes;
1032:
1033: if r_ja_in_tax_codes.tax_rate <> 0 then
1034: lv_codepath := jai_general_pkg.plot_codepath(24, lv_codepath); \* 24 *\
1035: ln_taxable_amount := cur_rec.tax_amount *
1036: (100 / r_ja_in_tax_codes.tax_rate);
1037: ln_taxable_amount := round(ln_taxable_amount, 2);
1038: else

Line 1040: lv_codepath := jai_general_pkg.plot_codepath(25, lv_codepath); \* 25 *\

1036: (100 / r_ja_in_tax_codes.tax_rate);
1037: ln_taxable_amount := round(ln_taxable_amount, 2);
1038: else
1039: \* 0 rated tax *\
1040: lv_codepath := jai_general_pkg.plot_codepath(25, lv_codepath); \* 25 *\
1041: ln_taxable_amount := cur_rec.taxable_amount * ln_exchange_rate;
1042: end if;
1043:
1044: */

Line 1066: lv_codepath := jai_general_pkg.plot_codepath(26, lv_codepath); /* 26 */

1062: goto end_of_outer_loop;
1063: END IF;
1064:
1065: --Update the Threshold Group with the Invoice Amount fetched in the above step.
1066: lv_codepath := jai_general_pkg.plot_codepath(26, lv_codepath); /* 26 */
1067: ln_threshold_grp_id := cur_rec.threshold_grp_id;
1068: jai_ap_dtc_generation_pkg.maintain_thhold_grps(p_threshold_grp_id => ln_threshold_grp_id,
1069: p_trx_invoice_cancel_amount => ln_trx_invoice_amount,
1070: p_tds_event => 'INVOICE CANCEL',

Line 1130: lv_codepath := jai_general_pkg.plot_codepath(27, lv_codepath); /* 27 */

1126: sysdate,
1127: fnd_global.user_id,
1128: sysdate,
1129: fnd_global.login_id);
1130: lv_codepath := jai_general_pkg.plot_codepath(27, lv_codepath); /* 27 */
1131:
1132: jai_ap_dtc_generation_pkg.get_tds_threshold_slab(p_prepay_distribution_id => NULL,
1133: p_invoice_id => p_invoice_id,
1134: p_threshold_grp_id => cur_rec.threshold_grp_id,

Line 1192: lv_codepath := jai_general_pkg.plot_codepath(100, lv_codepath, null,'END'); /* 100 */

1188: --Added by Chong for bug#16414088 eTDS ER End
1189:
1190: <>
1191:
1192: lv_codepath := jai_general_pkg.plot_codepath(100, lv_codepath, null,'END'); /* 100 */
1193: --Fnd_File.put_line(Fnd_File.LOG, lv_codepath);
1194: --Fnd_File.put_line(Fnd_File.LOG, '**** END of procedure jai_ap_dtc_cancellation_pkg.process_invoice ****');
1195: IF ( ln_proc_level >= ln_dbg_level)
1196: THEN