DBA Data[Home] [Help]

APPS.JAI_AP_TDS_TAX_DEFAULTATION dependencies on JAI_GENERAL_PKG

Line 153: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_ap_tds_tax_defaultation.process_invoice', 'START'); /* 1 */

149:
150:
151: begin
152:
153: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_ap_tds_tax_defaultation.process_invoice', 'START'); /* 1 */
154: /* Check if defaulting can happen for the invoice */
155:
156: validate_status_for_default
157: (

Line 169: p_codepath := jai_general_pkg.plot_codepath(2, p_codepath); /* 2 */

165: );
166:
167: if nvl(p_process_flag, 'N') <> 'Y' then
168: /* p_process_flag has the value of Y whenever TDS defaultation can take place */
169: p_codepath := jai_general_pkg.plot_codepath(2, p_codepath); /* 2 */
170: goto exit_from_procedure;
171: end if;
172:
173: open c_gl_sets_of_books(p_set_of_books_id);

Line 177: p_codepath := jai_general_pkg.plot_codepath(3, p_codepath); /* 3 */

173: open c_gl_sets_of_books(p_set_of_books_id);
174: fetch c_gl_sets_of_books into r_gl_sets_of_books;
175: close c_gl_sets_of_books;
176:
177: p_codepath := jai_general_pkg.plot_codepath(3, p_codepath); /* 3 */
178: if r_gl_sets_of_books.currency_code <> p_invoice_currency_code then
179: /* Foreign currency invoice */
180: p_codepath := jai_general_pkg.plot_codepath(3.1, p_codepath); /* 3.1 */
181: ln_exchange_rate := p_exchange_rate;

Line 180: p_codepath := jai_general_pkg.plot_codepath(3.1, p_codepath); /* 3.1 */

176:
177: p_codepath := jai_general_pkg.plot_codepath(3, p_codepath); /* 3 */
178: if r_gl_sets_of_books.currency_code <> p_invoice_currency_code then
179: /* Foreign currency invoice */
180: p_codepath := jai_general_pkg.plot_codepath(3.1, p_codepath); /* 3.1 */
181: ln_exchange_rate := p_exchange_rate;
182: end if;
183:
184: ln_exchange_rate := nvl(ln_exchange_rate, 1);

Line 190: p_codepath := jai_general_pkg.plot_codepath(4, p_codepath); /* 4 */

186:
187: if p_input_dff_value_wct is not null or
188: p_old_input_dff_value_wct is not null then --Added by Bgowrava for Bug#5911913
189:
190: p_codepath := jai_general_pkg.plot_codepath(4, p_codepath); /* 4 */
191:
192: populate_localization_inv_tax
193: (
194: p_invoice_id => p_invoice_id,

Line 222: p_codepath := jai_general_pkg.plot_codepath(5, p_codepath); /* 5 */

218:
219:
220:
221: if nvl(p_process_flag, 'N') = 'E' then
222: p_codepath := jai_general_pkg.plot_codepath(5, p_codepath); /* 5 */
223: goto exit_from_procedure;
224: end if;
225:
226: end if; /* p_input_dff_value_wct */

Line 229: p_codepath := jai_general_pkg.plot_codepath(6, p_codepath); /* 6 */

225:
226: end if; /* p_input_dff_value_wct */
227:
228:
229: p_codepath := jai_general_pkg.plot_codepath(6, p_codepath); /* 6 */
230:
231: if p_input_dff_value_essi is not null or
232: p_old_input_dff_value_essi is not null then --Added by Bgowrava for Bug#5911913
233:

Line 234: p_codepath := jai_general_pkg.plot_codepath(7, p_codepath); /* 7 */

230:
231: if p_input_dff_value_essi is not null or
232: p_old_input_dff_value_essi is not null then --Added by Bgowrava for Bug#5911913
233:
234: p_codepath := jai_general_pkg.plot_codepath(7, p_codepath); /* 7 */
235:
236: populate_localization_inv_tax
237: (
238: p_invoice_id => p_invoice_id,

Line 264: p_codepath := jai_general_pkg.plot_codepath(8, p_codepath); /* 8 */

260: p_codepath => p_codepath
261: );
262:
263: if nvl(p_process_flag, 'N') = 'E' then
264: p_codepath := jai_general_pkg.plot_codepath(8, p_codepath); /* 8 */
265: goto exit_from_procedure;
266: end if;
267:
268: end if; /* p_input_dff_value_essi */

Line 271: p_codepath := jai_general_pkg.plot_codepath(9, p_codepath); /* 9 */

267:
268: end if; /* p_input_dff_value_essi */
269:
270:
271: p_codepath := jai_general_pkg.plot_codepath(9, p_codepath); /* 9 */
272:
273: if p_rcv_transaction_id is not null then
274:
275: /* If the invoice has a receipt reference get the tax from receipt */

Line 276: p_codepath := jai_general_pkg.plot_codepath(10, p_codepath); /* 10 */

272:
273: if p_rcv_transaction_id is not null then
274:
275: /* If the invoice has a receipt reference get the tax from receipt */
276: p_codepath := jai_general_pkg.plot_codepath(10, p_codepath); /* 10 */
277:
278: default_tds_from_receipt
279: (
280: p_invoice_id => p_invoice_id,

Line 295: p_codepath := jai_general_pkg.plot_codepath(11, p_codepath); /* 11 */

291: p_codepath => p_codepath
292: );
293:
294: if nvl(p_process_flag, 'N') = 'E' then
295: p_codepath := jai_general_pkg.plot_codepath(11, p_codepath); /* 11 */
296: goto exit_from_procedure;
297: end if;
298:
299: elsif p_po_distribution_id is not null then

Line 302: p_codepath := jai_general_pkg.plot_codepath(12, p_codepath); /* 12 */

298:
299: elsif p_po_distribution_id is not null then
300: /* If the invoice has a PO reference get the tax from PO */
301:
302: p_codepath := jai_general_pkg.plot_codepath(12, p_codepath); /* 12 */
303: default_tds_from_po
304: (
305: p_invoice_id => p_invoice_id,
306: p_invoice_line_number => p_invoice_line_number,

Line 320: p_codepath := jai_general_pkg.plot_codepath(13, p_codepath); /* 13 */

316: p_codepath => p_codepath
317: );
318:
319: if nvl(p_process_flag, 'N') = 'E' then
320: p_codepath := jai_general_pkg.plot_codepath(13, p_codepath); /* 13 */
321: goto exit_from_procedure;
322: end if;
323:
324:

Line 327: p_codepath := jai_general_pkg.plot_codepath(14, p_codepath); /* 14 */

323:
324:
325: end if;
326:
327: p_codepath := jai_general_pkg.plot_codepath(14, p_codepath); /* 14 */
328:
329: if ln_default_tds_tax_id is null then
330: /* Default from setup if not already defaulted from PO or Receipt */
331: default_tds_from_setup

Line 346: p_codepath := jai_general_pkg.plot_codepath(15, p_codepath); /* 15 */

342: );
343: end if;
344:
345: if nvl(p_process_flag, 'N') = 'E' then
346: p_codepath := jai_general_pkg.plot_codepath(15, p_codepath); /* 15 */
347: goto exit_from_procedure;
348: end if;
349:
350: p_codepath := jai_general_pkg.plot_codepath(16, p_codepath); /* 16 */

Line 350: p_codepath := jai_general_pkg.plot_codepath(16, p_codepath); /* 16 */

346: p_codepath := jai_general_pkg.plot_codepath(15, p_codepath); /* 15 */
347: goto exit_from_procedure;
348: end if;
349:
350: p_codepath := jai_general_pkg.plot_codepath(16, p_codepath); /* 16 */
351: validate_default_tds
352: (
353: p_vendor_id => p_vendor_id,
354: p_vendor_site_id => p_vendor_site_id,

Line 363: p_codepath := jai_general_pkg.plot_codepath(16.1, p_codepath); /* 16.1 */

359: p_codepath => p_codepath
360: );
361:
362: if nvl(p_process_flag, 'N') = 'E' then
363: p_codepath := jai_general_pkg.plot_codepath(16.1, p_codepath); /* 16.1 */
364: goto exit_from_procedure;
365: end if;
366:
367: p_codepath := jai_general_pkg.plot_codepath(17, p_codepath); /* 17 */

Line 367: p_codepath := jai_general_pkg.plot_codepath(17, p_codepath); /* 17 */

363: p_codepath := jai_general_pkg.plot_codepath(16.1, p_codepath); /* 16.1 */
364: goto exit_from_procedure;
365: end if;
366:
367: p_codepath := jai_general_pkg.plot_codepath(17, p_codepath); /* 17 */
368:
369: populate_localization_inv_tax
370: (
371: p_invoice_id => p_invoice_id,

Line 396: p_codepath := jai_general_pkg.plot_codepath(18, p_codepath); /* 18 */

392: P_process_message => P_process_message,
393: p_codepath => p_codepath
394: );
395:
396: p_codepath := jai_general_pkg.plot_codepath(18, p_codepath); /* 18 */
397:
398: << exit_from_procedure >>
399: p_codepath := jai_general_pkg.plot_codepath(19, p_codepath, null, 'END'); /* 19 */
400: return;

Line 399: p_codepath := jai_general_pkg.plot_codepath(19, p_codepath, null, 'END'); /* 19 */

395:
396: p_codepath := jai_general_pkg.plot_codepath(18, p_codepath); /* 18 */
397:
398: << exit_from_procedure >>
399: p_codepath := jai_general_pkg.plot_codepath(19, p_codepath, null, 'END'); /* 19 */
400: return;
401:
402: exception
403: when others then

Line 441: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_ap_tds_tax_defaultation.validate_status_for_default', 'START'); /* 1 */

437: lv_tds_process_status varchar2(1);
438:
439: begin
440:
441: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_ap_tds_tax_defaultation.validate_status_for_default', 'START'); /* 1 */
442: open c_check_tds_already_processed(p_invoice_id,'P');--rchandan for bug#4428980
443: fetch c_check_tds_already_processed into lv_tds_process_status;
444: close c_check_tds_already_processed;
445:

Line 448: p_codepath := jai_general_pkg.plot_codepath(2, p_codepath); /* 2 */

444: close c_check_tds_already_processed;
445:
446: if nvl(lv_tds_process_status, 'N') = 'P'then
447: /* TDS invoice has already been processed for this invoice, Cannot process again */
448: p_codepath := jai_general_pkg.plot_codepath(2, p_codepath); /* 2 */
449: p_process_flag := 'P';
450: P_process_message := 'TDS is already processed for this invoice ';
451: goto exit_from_procedure;
452: end if;

Line 460: p_codepath := jai_general_pkg.plot_codepath(2.1, p_codepath); /* 2.1 */

456: fetch c_check_old_tds_processed into lv_tds_process_status;
457: close c_check_old_tds_processed;
458:
459: if nvl(lv_tds_process_status, 'N') = 'Y' then
460: p_codepath := jai_general_pkg.plot_codepath(2.1, p_codepath); /* 2.1 */
461: p_process_flag := 'P';
462: P_process_message := 'TDS is already processed for this invoice in the old system, cannot process.';
463: goto exit_from_procedure;
464: end if;

Line 470: p_codepath := jai_general_pkg.plot_codepath(3, p_codepath); /* 3 */

466:
467: /* Currently defaulting happens only for ITEM lines
468: This will be extended to MISCELLANEOUS lines once the tax precedences ER is in place */
469:
470: p_codepath := jai_general_pkg.plot_codepath(3, p_codepath); /* 3 */
471: if p_line_type_lookup_code not in ('ITEM', 'MISCELLANEOUS', 'ACCRUAL', 'IPV') then /* ACCRUAL - AP lines uptake */ --Added IPV by Bgowrava for bug#9214036
472: p_process_flag := 'X';
473: P_process_message := 'TDS is not applicable as the line is not an ITEM, ACCRUAL or or MISCELLANEOUS line';
474: p_codepath := jai_general_pkg.plot_codepath(4, p_codepath); /* 4 */

Line 474: p_codepath := jai_general_pkg.plot_codepath(4, p_codepath); /* 4 */

470: p_codepath := jai_general_pkg.plot_codepath(3, p_codepath); /* 3 */
471: if p_line_type_lookup_code not in ('ITEM', 'MISCELLANEOUS', 'ACCRUAL', 'IPV') then /* ACCRUAL - AP lines uptake */ --Added IPV by Bgowrava for bug#9214036
472: p_process_flag := 'X';
473: P_process_message := 'TDS is not applicable as the line is not an ITEM, ACCRUAL or or MISCELLANEOUS line';
474: p_codepath := jai_general_pkg.plot_codepath(4, p_codepath); /* 4 */
475: goto exit_from_procedure;
476: end if;
477:
478:

Line 480: p_codepath := jai_general_pkg.plot_codepath(5, p_codepath); /* 5 */

476: end if;
477:
478:
479: << exit_from_procedure >>
480: p_codepath := jai_general_pkg.plot_codepath(5, p_codepath); /* 5 */
481: if p_process_flag is null then
482: /* All checks fine, TDS defaultation can take place */
483: p_process_flag := 'Y';
484: p_codepath := jai_general_pkg.plot_codepath(6, p_codepath); /* 6 */

Line 484: p_codepath := jai_general_pkg.plot_codepath(6, p_codepath); /* 6 */

480: p_codepath := jai_general_pkg.plot_codepath(5, p_codepath); /* 5 */
481: if p_process_flag is null then
482: /* All checks fine, TDS defaultation can take place */
483: p_process_flag := 'Y';
484: p_codepath := jai_general_pkg.plot_codepath(6, p_codepath); /* 6 */
485: end if;
486:
487: p_codepath := jai_general_pkg.plot_codepath(7, p_codepath, null, 'END'); /* 7 */
488: return;

Line 487: p_codepath := jai_general_pkg.plot_codepath(7, p_codepath, null, 'END'); /* 7 */

483: p_process_flag := 'Y';
484: p_codepath := jai_general_pkg.plot_codepath(6, p_codepath); /* 6 */
485: end if;
486:
487: p_codepath := jai_general_pkg.plot_codepath(7, p_codepath, null, 'END'); /* 7 */
488: return;
489:
490: exception
491: when others then

Line 543: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_ap_tds_tax_defaultation.default_tds_from_receipt', 'START'); /* 1 */

539:
540: begin
541:
542: /* Get Receipt Details */
543: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_ap_tds_tax_defaultation.default_tds_from_receipt', 'START'); /* 1 */
544: open c_rcv_transactions(p_rcv_transaction_id);
545: fetch c_rcv_transactions into c_rec_rcv_transactions;
546: close c_rcv_transactions;
547:

Line 548: p_codepath := jai_general_pkg.plot_codepath(2, p_codepath); /* 2 */

544: open c_rcv_transactions(p_rcv_transaction_id);
545: fetch c_rcv_transactions into c_rec_rcv_transactions;
546: close c_rcv_transactions;
547:
548: p_codepath := jai_general_pkg.plot_codepath(2, p_codepath); /* 2 */
549: /* Check if TDS type of tax exists against the shipment line in Receipt taxes */
550: open c_check_receipt_tds_tax
551: (c_rec_rcv_transactions.shipment_header_id, c_rec_rcv_transactions.shipment_line_id,'TDS_SECTION');--rchandan for bug#4428980
552: fetch c_check_receipt_tds_tax into c_rec_check_receipt_tds_tax;

Line 555: p_codepath := jai_general_pkg.plot_codepath(3, p_codepath); /* 3 */

551: (c_rec_rcv_transactions.shipment_header_id, c_rec_rcv_transactions.shipment_line_id,'TDS_SECTION');--rchandan for bug#4428980
552: fetch c_check_receipt_tds_tax into c_rec_check_receipt_tds_tax;
553: close c_check_receipt_tds_tax;
554:
555: p_codepath := jai_general_pkg.plot_codepath(3, p_codepath); /* 3 */
556: if c_rec_check_receipt_tds_tax.section_code is null then
557: /* No TDS tax exists against the receipt line */
558: p_codepath := jai_general_pkg.plot_codepath(4, p_codepath); /* 4 */
559: goto exit_from_procedure;

Line 558: p_codepath := jai_general_pkg.plot_codepath(4, p_codepath); /* 4 */

554:
555: p_codepath := jai_general_pkg.plot_codepath(3, p_codepath); /* 3 */
556: if c_rec_check_receipt_tds_tax.section_code is null then
557: /* No TDS tax exists against the receipt line */
558: p_codepath := jai_general_pkg.plot_codepath(4, p_codepath); /* 4 */
559: goto exit_from_procedure;
560: end if;
561:
562: /* Control comes here only when a TDS tax exists against the receipt */

Line 569: p_codepath := jai_general_pkg.plot_codepath(5, p_codepath, null, 'END'); /* 5 */

565: p_tds_tax_id := c_rec_check_receipt_tds_tax.tax_id;
566: p_default_from := 'Receipt';
567:
568: << exit_from_procedure >>
569: p_codepath := jai_general_pkg.plot_codepath(5, p_codepath, null, 'END'); /* 5 */
570: return;
571:
572: exception
573: when others then

Line 629: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_ap_tds_tax_defaultation.default_tds_from_po', 'START'); /* 1 */

625: c_rec_po_taxes c_po_taxes%rowtype;
626:
627: begin
628:
629: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_ap_tds_tax_defaultation.default_tds_from_po', 'START'); /* 1 */
630: open c_po_distributions_all(p_po_distribution_id);
631: fetch c_po_distributions_all into c_rec_po_distributions_all;
632: close c_po_distributions_all;
633:

Line 635: p_codepath := jai_general_pkg.plot_codepath(2, p_codepath); /* 2 */

631: fetch c_po_distributions_all into c_rec_po_distributions_all;
632: close c_po_distributions_all;
633:
634: /* Check if TDS type of tax exists against if PO taxes */
635: p_codepath := jai_general_pkg.plot_codepath(2, p_codepath); /* 2 */
636: open c_po_taxes
637: (
638: c_rec_po_distributions_all.po_header_id,
639: c_rec_po_distributions_all.po_line_id,

Line 648: p_codepath := jai_general_pkg.plot_codepath(3, p_codepath); /* 3 */

644: close c_po_taxes;
645:
646: if c_rec_po_taxes.section_code is null then
647: /* No TDS tax exists against the receipt line */
648: p_codepath := jai_general_pkg.plot_codepath(3, p_codepath); /* 3 */
649: goto exit_from_procedure;
650: end if;
651:
652: /* Control comes here only when a TDS tax exists against the receipt */

Line 658: p_codepath := jai_general_pkg.plot_codepath(4, p_codepath, null, 'END'); /* 4 */

654: p_tds_tax_id := c_rec_po_taxes.tax_id;
655: p_default_from := 'PO';
656:
657: << exit_from_procedure >>
658: p_codepath := jai_general_pkg.plot_codepath(4, p_codepath, null, 'END'); /* 4 */
659: return;
660:
661: exception
662: when others then

Line 700: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_ap_tds_tax_defaultation.default_tds_from_setup', 'START'); /* 1 */

696:
697: begin
698:
699: /* Check from setup for vendor and site */
700: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_ap_tds_tax_defaultation.default_tds_from_setup', 'START'); /* 1 */
701: p_default_from := 'Vendor Site Setup';
702: open c_ja_in_vendor_tds_info_hdr(p_vendor_id, p_vendor_site_id);
703: fetch c_ja_in_vendor_tds_info_hdr into crec_ja_in_vendor_tds_info_hdr;
704: close c_ja_in_vendor_tds_info_hdr;

Line 706: p_codepath := jai_general_pkg.plot_codepath(2, p_codepath); /* 2 */

702: open c_ja_in_vendor_tds_info_hdr(p_vendor_id, p_vendor_site_id);
703: fetch c_ja_in_vendor_tds_info_hdr into crec_ja_in_vendor_tds_info_hdr;
704: close c_ja_in_vendor_tds_info_hdr;
705:
706: p_codepath := jai_general_pkg.plot_codepath(2, p_codepath); /* 2 */
707: if crec_ja_in_vendor_tds_info_hdr.tax_id is null and
708: crec_ja_in_vendor_tds_info_hdr.section_code is null
709: then
710: /* No setup exists for site, check for null site */

Line 711: p_codepath := jai_general_pkg.plot_codepath(3, p_codepath); /* 3 */

707: if crec_ja_in_vendor_tds_info_hdr.tax_id is null and
708: crec_ja_in_vendor_tds_info_hdr.section_code is null
709: then
710: /* No setup exists for site, check for null site */
711: p_codepath := jai_general_pkg.plot_codepath(3, p_codepath); /* 3 */
712: p_default_from := 'Vendor Null Site Setup';
713:
714: crec_ja_in_vendor_tds_info_hdr := null;
715: open c_ja_in_vendor_tds_info_hdr(p_vendor_id, 0);

Line 720: p_codepath := jai_general_pkg.plot_codepath(4, p_codepath); /* 4 */

716: fetch c_ja_in_vendor_tds_info_hdr into crec_ja_in_vendor_tds_info_hdr;
717: close c_ja_in_vendor_tds_info_hdr;
718: end if;
719:
720: p_codepath := jai_general_pkg.plot_codepath(4, p_codepath); /* 4 */
721: if crec_ja_in_vendor_tds_info_hdr.tax_id is not null and
722: crec_ja_in_vendor_tds_info_hdr.section_code is not null
723: then
724:

Line 726: p_codepath := jai_general_pkg.plot_codepath(5, p_codepath); /* 5 */

722: crec_ja_in_vendor_tds_info_hdr.section_code is not null
723: then
724:
725: /* Tax has been define as the default */
726: p_codepath := jai_general_pkg.plot_codepath(5, p_codepath); /* 5 */
727: p_tds_section_code := crec_ja_in_vendor_tds_info_hdr.section_code;
728: p_tds_tax_id := crec_ja_in_vendor_tds_info_hdr.tax_id;
729: p_default_type := 'TAX';
730:

Line 736: p_codepath := jai_general_pkg.plot_codepath(6, p_codepath); /* 6 */

732: crec_ja_in_vendor_tds_info_hdr.section_code is not null
733: then
734:
735: /* Section has been define as the default */
736: p_codepath := jai_general_pkg.plot_codepath(6, p_codepath); /* 6 */
737: p_tds_section_code := crec_ja_in_vendor_tds_info_hdr.section_code;
738: p_default_type := 'SECTION';
739:
740: else

Line 743: p_codepath := jai_general_pkg.plot_codepath(8, p_codepath); /* 8 */

739:
740: else
741:
742: /* No Default has been setup for the vendor */
743: p_codepath := jai_general_pkg.plot_codepath(8, p_codepath); /* 8 */
744: goto exit_from_procedure;
745:
746: end if;
747:

Line 750: p_codepath := jai_general_pkg.plot_codepath(9, p_codepath, null, 'END'); /* 9 */

746: end if;
747:
748:
749: << exit_from_procedure >>
750: p_codepath := jai_general_pkg.plot_codepath(9, p_codepath, null, 'END'); /* 9 */
751: return;
752:
753: exception
754: when others then

Line 794: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_ap_tds_tax_defaultation.validate_default_tds', 'START'); /* 1 */

790: lv_check_section_applicable varchar2(1);
791:
792: begin
793:
794: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_ap_tds_tax_defaultation.validate_default_tds', 'START'); /* 1 */
795: open c_ja_in_vendor_tds_info_hdr(p_vendor_id, p_vendor_site_id);
796: fetch c_ja_in_vendor_tds_info_hdr into lv_confirm_pan_flag;
797: close c_ja_in_vendor_tds_info_hdr;
798:

Line 799: p_codepath := jai_general_pkg.plot_codepath(2, p_codepath); /* 2 */

795: open c_ja_in_vendor_tds_info_hdr(p_vendor_id, p_vendor_site_id);
796: fetch c_ja_in_vendor_tds_info_hdr into lv_confirm_pan_flag;
797: close c_ja_in_vendor_tds_info_hdr;
798:
799: p_codepath := jai_general_pkg.plot_codepath(2, p_codepath); /* 2 */
800: if lv_confirm_pan_flag = 'N' then
801: p_codepath := jai_general_pkg.plot_codepath(3, p_codepath); /* 3 */
802: p_process_flag := 'V';
803: P_process_message := 'PAN of the vendor site not confirmed';

Line 801: p_codepath := jai_general_pkg.plot_codepath(3, p_codepath); /* 3 */

797: close c_ja_in_vendor_tds_info_hdr;
798:
799: p_codepath := jai_general_pkg.plot_codepath(2, p_codepath); /* 2 */
800: if lv_confirm_pan_flag = 'N' then
801: p_codepath := jai_general_pkg.plot_codepath(3, p_codepath); /* 3 */
802: p_process_flag := 'V';
803: P_process_message := 'PAN of the vendor site not confirmed';
804: /*goto exit_from_procedure; Bug#11896260*/
805: end if;

Line 807: p_codepath := jai_general_pkg.plot_codepath(4, p_codepath); /* 4 */

803: P_process_message := 'PAN of the vendor site not confirmed';
804: /*goto exit_from_procedure; Bug#11896260*/
805: end if;
806:
807: p_codepath := jai_general_pkg.plot_codepath(4, p_codepath); /* 4 */
808:
809:
810: /* Check if section is applicable because of regular setup */
811: p_codepath := jai_general_pkg.plot_codepath(5, p_codepath); /* 5 */

Line 811: p_codepath := jai_general_pkg.plot_codepath(5, p_codepath); /* 5 */

807: p_codepath := jai_general_pkg.plot_codepath(4, p_codepath); /* 4 */
808:
809:
810: /* Check if section is applicable because of regular setup */
811: p_codepath := jai_general_pkg.plot_codepath(5, p_codepath); /* 5 */
812: open c_check_section_applicable(p_vendor_id, p_vendor_site_id, p_tds_section_code,'TDS_SECTION' );
813: fetch c_check_section_applicable into lv_check_section_applicable;
814: close c_check_section_applicable;
815:

Line 817: p_codepath := jai_general_pkg.plot_codepath(7, p_codepath); /* 7 */

813: fetch c_check_section_applicable into lv_check_section_applicable;
814: close c_check_section_applicable;
815:
816: if nvl(lv_check_section_applicable, 'N') <> 'Y' then
817: p_codepath := jai_general_pkg.plot_codepath(7, p_codepath); /* 7 */
818: p_process_flag := 'V';
819: P_process_message := 'Section is not applicable to the vendor and / or site';
820: end if;
821:

Line 824: p_codepath := jai_general_pkg.plot_codepath(8, p_codepath, null, 'END'); /* 8 */

820: end if;
821:
822:
823: << exit_from_procedure >>
824: p_codepath := jai_general_pkg.plot_codepath(8, p_codepath, null, 'END'); /* 8 */
825: return;
826:
827: exception
828: when others then

Line 1052: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_ap_tds_tax_defaultation.populate_localization_inv_tax', 'START'); /* 2 */

1048: ln_check_if_tax_is_input :=0;
1049: lv_consider_for_redefault := 'N';
1050: lv_user_deleted_tax_flag := 'N';
1051:
1052: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_ap_tds_tax_defaultation.populate_localization_inv_tax', 'START'); /* 2 */
1053:
1054: ln_default_tax_id := p_default_tax_id;
1055: ln_actual_tax_id := to_number(p_input_dff_value);
1056: ln_actual_dff_tax_id := 0; --Added by Bgowrava for Bug#5911913

Line 1064: p_codepath := jai_general_pkg.plot_codepath(4, p_codepath); /* 4 */

1060: /* If default value is SECTION check the default and the given tax */
1061:
1062: if p_default_type = 'SECTION' and p_default_section_code is not null then
1063:
1064: p_codepath := jai_general_pkg.plot_codepath(4, p_codepath); /* 4 */
1065:
1066: get_default_tax_from_section
1067: (
1068: p_invoice_id => p_invoice_id ,

Line 1105: p_codepath := jai_general_pkg.plot_codepath(6.1, p_codepath); /* 6.1 */

1101: );
1102:
1103:
1104: if lv_input_dff_value = 'NO TDS' then
1105: p_codepath := jai_general_pkg.plot_codepath(6.1, p_codepath); /* 6.1 */
1106: lv_user_deleted_tax_flag := 'Y';
1107: elsif lv_input_dff_value ='DEFAULTED TAX' then/*Added the elsif condition for bug 11830186 by amandali*/
1108: lv_user_deleted_tax_flag := 'Y';
1109: ln_actual_tax_id := NULL;

Line 1118: p_codepath := jai_general_pkg.plot_codepath(14, p_codepath); /* 14 */

1114: /* Value for consider_for_redefault */
1115: if ln_actual_tax_id is null and lv_user_deleted_tax_flag <> 'Y' and p_default_from not in ('PO', 'Receipt') then
1116: /* User has not given any input, or also has not specifically deleted the defaulted value or
1117: default is not because of PO or Receipt */
1118: p_codepath := jai_general_pkg.plot_codepath(14, p_codepath); /* 14 */
1119: if p_default_type = 'SECTION' then
1120: lv_consider_for_redefault := 'Y';
1121: p_codepath := jai_general_pkg.plot_codepath(15, p_codepath); /* 15 */
1122: end if;

Line 1121: p_codepath := jai_general_pkg.plot_codepath(15, p_codepath); /* 15 */

1117: default is not because of PO or Receipt */
1118: p_codepath := jai_general_pkg.plot_codepath(14, p_codepath); /* 14 */
1119: if p_default_type = 'SECTION' then
1120: lv_consider_for_redefault := 'Y';
1121: p_codepath := jai_general_pkg.plot_codepath(15, p_codepath); /* 15 */
1122: end if;
1123: end if;
1124: /* Value for consider_for_redefault */
1125:

Line 1128: p_codepath := jai_general_pkg.plot_codepath(19, p_codepath); /* 19 */

1124: /* Value for consider_for_redefault */
1125:
1126: end if; /* if p_section_type */
1127:
1128: p_codepath := jai_general_pkg.plot_codepath(19, p_codepath); /* 19 */
1129: open c_check_if_record_exists(p_invoice_id, p_invoice_line_number, p_invoice_distribution_id);
1130: fetch c_check_if_record_exists into ln_tds_inv_tax_id, ln_actual_dff_tax_id; --Modified by Bgowrava for Bug#5911913
1131: close c_check_if_record_exists;
1132:

Line 1142: p_codepath := jai_general_pkg.plot_codepath(20, p_codepath); /* 20 */

1138: end if ;
1139:
1140: if ln_tds_inv_tax_id is null then
1141:
1142: p_codepath := jai_general_pkg.plot_codepath(20, p_codepath); /* 20 */
1143: lv_process_status := 'D';
1144: insert into jai_ap_tds_inv_taxes
1145: (
1146: tds_inv_tax_id ,

Line 1205: p_codepath := jai_general_pkg.plot_codepath(21, p_codepath); /* 21 */

1201: );
1202:
1203: else
1204:
1205: p_codepath := jai_general_pkg.plot_codepath(21, p_codepath); /* 21 */
1206:
1207: update jai_ap_tds_inv_taxes
1208: set amount = p_amount ,
1209: section_type = p_section_type ,

Line 1313: p_codepath := jai_general_pkg.plot_codepath(22, p_codepath); /* 22 */

1309:
1310:
1311: if lv_consider_for_redefault = 'Y' and p_section_type = 'TDS_SECTION' then
1312:
1313: p_codepath := jai_general_pkg.plot_codepath(22, p_codepath); /* 22 */
1314:
1315: update jai_ap_tds_inv_taxes
1316: set default_tax_id = ln_default_tax_id
1317: where tds_inv_tax_id <> ln_tds_inv_tax_id

Line 1326: p_codepath := jai_general_pkg.plot_codepath(23, p_codepath); /* 23 */

1322:
1323: end if; /* lv_consider_for_redefault = 'Y' */
1324:
1325: if p_section_type = 'TDS_SECTION' then
1326: p_codepath := jai_general_pkg.plot_codepath(23, p_codepath); /* 23 */
1327: p_final_tds_tax_id := nvl(ln_actual_tax_id, ln_default_tax_id);
1328: end if;
1329:
1330: p_codepath := jai_general_pkg.plot_codepath(100, p_codepath, NULL, 'END'); /*100 */

Line 1330: p_codepath := jai_general_pkg.plot_codepath(100, p_codepath, NULL, 'END'); /*100 */

1326: p_codepath := jai_general_pkg.plot_codepath(23, p_codepath); /* 23 */
1327: p_final_tds_tax_id := nvl(ln_actual_tax_id, ln_default_tax_id);
1328: end if;
1329:
1330: p_codepath := jai_general_pkg.plot_codepath(100, p_codepath, NULL, 'END'); /*100 */
1331: return;
1332:
1333: exception
1334: when others then

Line 1495: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_ap_tds_tax_defaultation.get_default_tax_from_section', 'START'); /* 1 */

1491:
1492:
1493: begin
1494:
1495: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_ap_tds_tax_defaultation.get_default_tax_from_section', 'START'); /* 1 */
1496:
1497: ln_amount := p_amount * nvl(p_exchange_rate, 1);
1498:
1499:

Line 1526: p_codepath := jai_general_pkg.plot_codepath(2, p_codepath); /* 2 */

1522:
1523: ln_amount_for_redefault := nvl(ln_amount_for_redefault, 0);
1524: ln_amount_for_redefault := ln_amount_for_redefault * nvl(p_exchange_rate, 1);
1525:
1526: p_codepath := jai_general_pkg.plot_codepath(2, p_codepath); /* 2 */
1527: /* Get threshold id */
1528: open c_get_threshold(p_vendor_id, p_vendor_site_id, p_tds_section_code,'TDS_SECTION');--rchandan for bug#4428980
1529: fetch c_get_threshold into r_get_threshold;
1530: close c_get_threshold;

Line 1533: p_codepath := jai_general_pkg.plot_codepath(3, p_codepath); /* 3 */

1529: fetch c_get_threshold into r_get_threshold;
1530: close c_get_threshold;
1531:
1532:
1533: p_codepath := jai_general_pkg.plot_codepath(3, p_codepath); /* 3 */
1534: if r_get_threshold.threshold_hdr_id is null then
1535: /* No threshold has been setup for the section and vendor,
1536: it is not possible to default a tax from section */
1537: p_codepath := jai_general_pkg.plot_codepath(4, p_codepath); /* 4 */

Line 1537: p_codepath := jai_general_pkg.plot_codepath(4, p_codepath); /* 4 */

1533: p_codepath := jai_general_pkg.plot_codepath(3, p_codepath); /* 3 */
1534: if r_get_threshold.threshold_hdr_id is null then
1535: /* No threshold has been setup for the section and vendor,
1536: it is not possible to default a tax from section */
1537: p_codepath := jai_general_pkg.plot_codepath(4, p_codepath); /* 4 */
1538: p_tds_tax_id := null;
1539: goto exit_from_procedure;
1540: end if;
1541:

Line 1543: p_codepath := jai_general_pkg.plot_codepath(5, p_codepath); /* 5 */

1539: goto exit_from_procedure;
1540: end if;
1541:
1542: /* Get threshold group id */
1543: p_codepath := jai_general_pkg.plot_codepath(5, p_codepath); /* 5 */
1544: open c_get_threshold_group(p_vendor_id, lv_tan_no, lv_pan_no, p_tds_section_code, ln_fin_year,'TDS_SECTION');
1545: fetch c_get_threshold_group into ln_threshold_grp_id;
1546: close c_get_threshold_group;
1547:

Line 1551: p_codepath := jai_general_pkg.plot_codepath(6, p_codepath); /* 6 */

1547:
1548: /* if there is no threshold group details,
1549: it means no transaction has happened for that section and vendor combination */
1550: if ln_threshold_grp_id is not null then
1551: p_codepath := jai_general_pkg.plot_codepath(6, p_codepath); /* 6 */
1552: open c_jai_ap_tds_thhold_grps(ln_threshold_grp_id);
1553: fetch c_jai_ap_tds_thhold_grps into ln_total_invoice_amount;
1554: close c_jai_ap_tds_thhold_grps;
1555: p_threshold_grp_id := ln_threshold_grp_id;

Line 1560: p_codepath := jai_general_pkg.plot_codepath(7, p_codepath); /* 7 */

1556: end if;
1557:
1558: ln_total_invoice_amount := nvl(ln_total_invoice_amount, 0 ) ;
1559:
1560: p_codepath := jai_general_pkg.plot_codepath(7, p_codepath); /* 7 */
1561: /* Check if Cumulative threshold is reached */
1562: open c_jai_ap_tds_thhold_slabs
1563: (r_get_threshold.threshold_hdr_id, 'CUMULATIVE', ln_total_invoice_amount + ln_amount + ln_amount_for_redefault);
1564: fetch c_jai_ap_tds_thhold_slabs into r_jai_ap_tds_thhold_slabs;

Line 1567: p_codepath := jai_general_pkg.plot_codepath(8, p_codepath); /* 8 */

1563: (r_get_threshold.threshold_hdr_id, 'CUMULATIVE', ln_total_invoice_amount + ln_amount + ln_amount_for_redefault);
1564: fetch c_jai_ap_tds_thhold_slabs into r_jai_ap_tds_thhold_slabs;
1565: close c_jai_ap_tds_thhold_slabs;
1566:
1567: p_codepath := jai_general_pkg.plot_codepath(8, p_codepath); /* 8 */
1568:
1569: p_cumulative_threshold_slab_id := r_jai_ap_tds_thhold_slabs.threshold_slab_id;
1570:
1571: if ln_total_invoice_amount >= r_jai_ap_tds_thhold_slabs.from_amount then

Line 1573: p_codepath := jai_general_pkg.plot_codepath(9, p_codepath); /* 9 */

1569: p_cumulative_threshold_slab_id := r_jai_ap_tds_thhold_slabs.threshold_slab_id;
1570:
1571: if ln_total_invoice_amount >= r_jai_ap_tds_thhold_slabs.from_amount then
1572: /* Cumulative threshold amount is already reached */
1573: p_codepath := jai_general_pkg.plot_codepath(9, p_codepath); /* 9 */
1574: p_cumulative_threshold_stage := 'AFTER THRESHOLD';
1575:
1576: elsif (ln_total_invoice_amount + ln_amount + ln_amount_for_redefault) >= r_jai_ap_tds_thhold_slabs.from_amount then
1577:

Line 1579: p_codepath := jai_general_pkg.plot_codepath(10, p_codepath); /* 10 */

1575:
1576: elsif (ln_total_invoice_amount + ln_amount + ln_amount_for_redefault) >= r_jai_ap_tds_thhold_slabs.from_amount then
1577:
1578: /* Threshold reached with this transaction */
1579: p_codepath := jai_general_pkg.plot_codepath(10, p_codepath); /* 10 */
1580: p_cumulative_threshold_stage := 'AT THRESHOLD';
1581:
1582: else
1583:

Line 1590: p_codepath := jai_general_pkg.plot_codepath(11, p_codepath); /* 11 */

1586: /* Cumulative threshold is not reached, default the tax id anyway but
1587: check for SINGLE invoice threshold. This has to be checked with only invoice amount */
1588:
1589: r_jai_ap_tds_thhold_slabs:= null;
1590: p_codepath := jai_general_pkg.plot_codepath(11, p_codepath); /* 11 */
1591: /*Bug 12640899 - Fetch Total Invoice Amount before verifying if the Invoice breaches SINGLE Threshold.
1592: Each (distribution amount + previous distribution amounts) should not be compared with SINGLE Threshold From Amount*/
1593: OPEN c_get_invoice_amount;
1594: FETCH c_get_invoice_amount INTO ln_invoice_amount;

Line 1603: p_codepath := jai_general_pkg.plot_codepath(12, p_codepath); /* 12 */

1599: close c_jai_ap_tds_thhold_slabs;
1600:
1601: if ln_invoice_amount >= r_jai_ap_tds_thhold_slabs.from_amount then
1602: /* Cumulative threshold amount is reached */
1603: p_codepath := jai_general_pkg.plot_codepath(12, p_codepath); /* 12 */
1604: p_single_threshold_slab_id := r_jai_ap_tds_thhold_slabs.threshold_slab_id;
1605: end if;
1606:
1607: end if; /* Cumulative or single threshold amount */

Line 1617: p_codepath := jai_general_pkg.plot_codepath(13, p_codepath, null, 'END'); /* 13 */

1613:
1614: p_tds_tax_id := r_jai_ap_tds_thhold_taxes.tax_id;
1615:
1616: << exit_from_procedure >>
1617: p_codepath := jai_general_pkg.plot_codepath(13, p_codepath, null, 'END'); /* 13 */
1618: return;
1619:
1620: exception
1621: when others then

Line 1662: jai_general_pkg.plot_codepath(1, p_codepath, 'jai_ap_tds_tax_defaultation.process_input_dff_tds', 'START'); /* 1 */

1658:
1659: begin
1660:
1661: p_codepath :=
1662: jai_general_pkg.plot_codepath(1, p_codepath, 'jai_ap_tds_tax_defaultation.process_input_dff_tds', 'START'); /* 1 */
1663:
1664: p_output_tds_dff_value := p_input_tds_dff_value;
1665:
1666: open c_get_existing_dff_values(p_invoice_id, p_invoice_line_number, p_invoice_distribution_id,'TDS_SECTION');--rchandan for bug#4428980

Line 1672: p_codepath := jai_general_pkg.plot_codepath(2, p_codepath); /* 2 */

1668: close c_get_existing_dff_values;
1669:
1670: if r_get_existing_dff_values.tds_inv_tax_id is null then
1671: /* TDS defaultation Record does not exist */
1672: p_codepath := jai_general_pkg.plot_codepath(2, p_codepath); /* 2 */
1673: goto exit_from_procedure;
1674: end if;
1675:
1676: /* Control comes here only when defaultation details already exists */

Line 1681: p_codepath := jai_general_pkg.plot_codepath(3, p_codepath); /* 3 */

1677:
1678: if p_input_tds_dff_value is null then
1679:
1680: /* user has not provided any input or has deleted the defaulted or earlier given value */
1681: p_codepath := jai_general_pkg.plot_codepath(3, p_codepath); /* 3 */
1682:
1683: if r_get_existing_dff_values.default_tax_id is not null or
1684: r_get_existing_dff_values.actual_tax_id is not null then
1685:

Line 1686: p_codepath := jai_general_pkg.plot_codepath(4, p_codepath); /* 4 */

1682:
1683: if r_get_existing_dff_values.default_tax_id is not null or
1684: r_get_existing_dff_values.actual_tax_id is not null then
1685:
1686: p_codepath := jai_general_pkg.plot_codepath(4, p_codepath); /* 4 */
1687: /* User has deleted the earlier given or defaulted value no TDS should be deducted. */
1688: p_output_tds_dff_value := 'NO TDS';
1689:
1690: end if;

Line 1697: p_codepath := jai_general_pkg.plot_codepath(5, p_codepath); /* 5 */

1693: /* User has given the same value as default. Actual can be set to null */
1694: /*Added the below condition for bug 11830186 by amandali*/
1695: if(r_get_existing_dff_values.actual_tax_id is null)then
1696: /*If the tds tax_id is attached by default */
1697: p_codepath := jai_general_pkg.plot_codepath(5, p_codepath); /* 5 */
1698: p_output_tds_dff_value := 'DEFAULTED TAX';
1699: else
1700: /*if the default tax id is given manually*/
1701: p_codepath := jai_general_pkg.plot_codepath(6, p_codepath); /* 5 */

Line 1701: p_codepath := jai_general_pkg.plot_codepath(6, p_codepath); /* 5 */

1697: p_codepath := jai_general_pkg.plot_codepath(5, p_codepath); /* 5 */
1698: p_output_tds_dff_value := 'DEFAULTED TAX';
1699: else
1700: /*if the default tax id is given manually*/
1701: p_codepath := jai_general_pkg.plot_codepath(6, p_codepath); /* 5 */
1702: p_output_tds_dff_value := null;
1703: end if;
1704: end if; /* p_input_tds_dff_value */
1705:

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

1703: end if;
1704: end if; /* p_input_tds_dff_value */
1705:
1706: << exit_from_procedure >>
1707: p_codepath := jai_general_pkg.plot_codepath(100, p_codepath, null, 'END'); /* 100 */
1708: return;
1709:
1710: exception
1711: when others then