DBA Data[Home] [Help]

APPS.JAI_AP_TDS_TAX_DEFAULTATION dependencies on JAI_GENERAL_PKG

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

107:
108:
109: begin
110:
111: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_ap_tds_tax_defaultation.process_invoice', 'START'); /* 1 */
112: /* Check if defaulting can happen for the invoice */
113:
114: validate_status_for_default
115: (

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

123: );
124:
125: if nvl(p_process_flag, 'N') <> 'Y' then
126: /* p_process_flag has the value of Y whenever TDS defaultation can take place */
127: p_codepath := jai_general_pkg.plot_codepath(2, p_codepath); /* 2 */
128: goto exit_from_procedure;
129: end if;
130:
131: open c_gl_sets_of_books(p_set_of_books_id);

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

131: open c_gl_sets_of_books(p_set_of_books_id);
132: fetch c_gl_sets_of_books into r_gl_sets_of_books;
133: close c_gl_sets_of_books;
134:
135: p_codepath := jai_general_pkg.plot_codepath(3, p_codepath); /* 3 */
136: if r_gl_sets_of_books.currency_code <> p_invoice_currency_code then
137: /* Foreign currency invoice */
138: p_codepath := jai_general_pkg.plot_codepath(3.1, p_codepath); /* 3.1 */
139: ln_exchange_rate := p_exchange_rate;

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

134:
135: p_codepath := jai_general_pkg.plot_codepath(3, p_codepath); /* 3 */
136: if r_gl_sets_of_books.currency_code <> p_invoice_currency_code then
137: /* Foreign currency invoice */
138: p_codepath := jai_general_pkg.plot_codepath(3.1, p_codepath); /* 3.1 */
139: ln_exchange_rate := p_exchange_rate;
140: end if;
141:
142: ln_exchange_rate := nvl(ln_exchange_rate, 1);

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

143:
144:
145: if p_input_dff_value_wct is not null then
146:
147: p_codepath := jai_general_pkg.plot_codepath(4, p_codepath); /* 4 */
148:
149: populate_localization_inv_tax
150: (
151: p_invoice_id => p_invoice_id,

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

172:
173:
174:
175: if nvl(p_process_flag, 'N') = 'E' then
176: p_codepath := jai_general_pkg.plot_codepath(5, p_codepath); /* 5 */
177: goto exit_from_procedure;
178: end if;
179:
180: end if; /* p_input_dff_value_wct */

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

179:
180: end if; /* p_input_dff_value_wct */
181:
182:
183: p_codepath := jai_general_pkg.plot_codepath(6, p_codepath); /* 6 */
184:
185: if p_input_dff_value_essi is not null then
186:
187: p_codepath := jai_general_pkg.plot_codepath(7, p_codepath); /* 7 */

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

183: p_codepath := jai_general_pkg.plot_codepath(6, p_codepath); /* 6 */
184:
185: if p_input_dff_value_essi is not null then
186:
187: p_codepath := jai_general_pkg.plot_codepath(7, p_codepath); /* 7 */
188:
189: populate_localization_inv_tax
190: (
191: p_invoice_id => p_invoice_id,

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

210: p_codepath => p_codepath
211: );
212:
213: if nvl(p_process_flag, 'N') = 'E' then
214: p_codepath := jai_general_pkg.plot_codepath(8, p_codepath); /* 8 */
215: goto exit_from_procedure;
216: end if;
217:
218: end if; /* p_input_dff_value_essi */

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

217:
218: end if; /* p_input_dff_value_essi */
219:
220:
221: p_codepath := jai_general_pkg.plot_codepath(9, p_codepath); /* 9 */
222:
223: if p_rcv_transaction_id is not null then
224:
225: /* If the invoice has a receipt reference get the tax from receipt */

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

222:
223: if p_rcv_transaction_id is not null then
224:
225: /* If the invoice has a receipt reference get the tax from receipt */
226: p_codepath := jai_general_pkg.plot_codepath(10, p_codepath); /* 10 */
227:
228: default_tds_from_receipt
229: (
230: p_invoice_id => p_invoice_id,

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

241: p_codepath => p_codepath
242: );
243:
244: if nvl(p_process_flag, 'N') = 'E' then
245: p_codepath := jai_general_pkg.plot_codepath(11, p_codepath); /* 11 */
246: goto exit_from_procedure;
247: end if;
248:
249: elsif p_po_distribution_id is not null then

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

248:
249: elsif p_po_distribution_id is not null then
250: /* If the invoice has a PO reference get the tax from PO */
251:
252: p_codepath := jai_general_pkg.plot_codepath(12, p_codepath); /* 12 */
253: default_tds_from_po
254: (
255: p_invoice_id => p_invoice_id,
256: p_invoice_line_number => p_invoice_line_number,

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

266: p_codepath => p_codepath
267: );
268:
269: if nvl(p_process_flag, 'N') = 'E' then
270: p_codepath := jai_general_pkg.plot_codepath(13, p_codepath); /* 13 */
271: goto exit_from_procedure;
272: end if;
273:
274:

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

273:
274:
275: end if;
276:
277: p_codepath := jai_general_pkg.plot_codepath(14, p_codepath); /* 14 */
278:
279: if ln_default_tds_tax_id is null then
280: /* Default from setup if not already defaulted from PO or Receipt */
281: default_tds_from_setup

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

292: );
293: end if;
294:
295: if nvl(p_process_flag, 'N') = 'E' then
296: p_codepath := jai_general_pkg.plot_codepath(15, p_codepath); /* 15 */
297: goto exit_from_procedure;
298: end if;
299:
300: p_codepath := jai_general_pkg.plot_codepath(16, p_codepath); /* 16 */

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

296: p_codepath := jai_general_pkg.plot_codepath(15, p_codepath); /* 15 */
297: goto exit_from_procedure;
298: end if;
299:
300: p_codepath := jai_general_pkg.plot_codepath(16, p_codepath); /* 16 */
301: validate_default_tds
302: (
303: p_vendor_id => p_vendor_id,
304: p_vendor_site_id => p_vendor_site_id,

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

309: p_codepath => p_codepath
310: );
311:
312: if nvl(p_process_flag, 'N') = 'E' then
313: p_codepath := jai_general_pkg.plot_codepath(16.1, p_codepath); /* 16.1 */
314: goto exit_from_procedure;
315: end if;
316:
317: p_codepath := jai_general_pkg.plot_codepath(17, p_codepath); /* 17 */

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

313: p_codepath := jai_general_pkg.plot_codepath(16.1, p_codepath); /* 16.1 */
314: goto exit_from_procedure;
315: end if;
316:
317: p_codepath := jai_general_pkg.plot_codepath(17, p_codepath); /* 17 */
318:
319: populate_localization_inv_tax
320: (
321: p_invoice_id => p_invoice_id,

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

339: P_process_message => P_process_message,
340: p_codepath => p_codepath
341: );
342:
343: p_codepath := jai_general_pkg.plot_codepath(18, p_codepath); /* 18 */
344:
345: << exit_from_procedure >>
346: p_codepath := jai_general_pkg.plot_codepath(19, p_codepath, null, 'END'); /* 19 */
347: return;

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

342:
343: p_codepath := jai_general_pkg.plot_codepath(18, p_codepath); /* 18 */
344:
345: << exit_from_procedure >>
346: p_codepath := jai_general_pkg.plot_codepath(19, p_codepath, null, 'END'); /* 19 */
347: return;
348:
349: exception
350: when others then

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

384: lv_tds_process_status varchar2(1);
385:
386: begin
387:
388: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_ap_tds_tax_defaultation.validate_status_for_default', 'START'); /* 1 */
389: open c_check_tds_already_processed(p_invoice_id,'P');--rchandan for bug#4428980
390: fetch c_check_tds_already_processed into lv_tds_process_status;
391: close c_check_tds_already_processed;
392:

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

391: close c_check_tds_already_processed;
392:
393: if nvl(lv_tds_process_status, 'N') = 'P'then
394: /* TDS invoice has already been processed for this invoice, Cannot process again */
395: p_codepath := jai_general_pkg.plot_codepath(2, p_codepath); /* 2 */
396: p_process_flag := 'P';
397: P_process_message := 'TDS is already processed for this invoice ';
398: goto exit_from_procedure;
399: end if;

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

403: fetch c_check_old_tds_processed into lv_tds_process_status;
404: close c_check_old_tds_processed;
405:
406: if nvl(lv_tds_process_status, 'N') = 'Y' then
407: p_codepath := jai_general_pkg.plot_codepath(2.1, p_codepath); /* 2.1 */
408: p_process_flag := 'P';
409: P_process_message := 'TDS is already processed for this invoice in the old system, cannot process.';
410: goto exit_from_procedure;
411: end if;

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

413:
414: /* Currently defaulting happens only for ITEM lines
415: This will be extended to MISCELLANEOUS lines once the tax precedences ER is in place */
416:
417: p_codepath := jai_general_pkg.plot_codepath(3, p_codepath); /* 3 */
418: if p_line_type_lookup_code not in ('ITEM', 'MISCELLANEOUS', 'ACCRUAL' ) then /* ACCRUAL - AP lines uptake */
419: p_process_flag := 'X';
420: P_process_message := 'TDS is not applicable as the line is not an ITEM, ACCRUAL or or MISCELLANEOUS line';
421: p_codepath := jai_general_pkg.plot_codepath(4, p_codepath); /* 4 */

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

417: p_codepath := jai_general_pkg.plot_codepath(3, p_codepath); /* 3 */
418: if p_line_type_lookup_code not in ('ITEM', 'MISCELLANEOUS', 'ACCRUAL' ) then /* ACCRUAL - AP lines uptake */
419: p_process_flag := 'X';
420: P_process_message := 'TDS is not applicable as the line is not an ITEM, ACCRUAL or or MISCELLANEOUS line';
421: p_codepath := jai_general_pkg.plot_codepath(4, p_codepath); /* 4 */
422: goto exit_from_procedure;
423: end if;
424:
425:

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

423: end if;
424:
425:
426: << exit_from_procedure >>
427: p_codepath := jai_general_pkg.plot_codepath(5, p_codepath); /* 5 */
428: if p_process_flag is null then
429: /* All checks fine, TDS defaultation can take place */
430: p_process_flag := 'Y';
431: p_codepath := jai_general_pkg.plot_codepath(6, p_codepath); /* 6 */

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

427: p_codepath := jai_general_pkg.plot_codepath(5, p_codepath); /* 5 */
428: if p_process_flag is null then
429: /* All checks fine, TDS defaultation can take place */
430: p_process_flag := 'Y';
431: p_codepath := jai_general_pkg.plot_codepath(6, p_codepath); /* 6 */
432: end if;
433:
434: p_codepath := jai_general_pkg.plot_codepath(7, p_codepath, null, 'END'); /* 7 */
435: return;

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

430: p_process_flag := 'Y';
431: p_codepath := jai_general_pkg.plot_codepath(6, p_codepath); /* 6 */
432: end if;
433:
434: p_codepath := jai_general_pkg.plot_codepath(7, p_codepath, null, 'END'); /* 7 */
435: return;
436:
437: exception
438: when others then

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

486:
487: begin
488:
489: /* Get Receipt Details */
490: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_ap_tds_tax_defaultation.default_tds_from_receipt', 'START'); /* 1 */
491: open c_rcv_transactions(p_rcv_transaction_id);
492: fetch c_rcv_transactions into c_rec_rcv_transactions;
493: close c_rcv_transactions;
494:

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

491: open c_rcv_transactions(p_rcv_transaction_id);
492: fetch c_rcv_transactions into c_rec_rcv_transactions;
493: close c_rcv_transactions;
494:
495: p_codepath := jai_general_pkg.plot_codepath(2, p_codepath); /* 2 */
496: /* Check if TDS type of tax exists against the shipment line in Receipt taxes */
497: open c_check_receipt_tds_tax
498: (c_rec_rcv_transactions.shipment_header_id, c_rec_rcv_transactions.shipment_line_id,'TDS_SECTION');--rchandan for bug#4428980
499: fetch c_check_receipt_tds_tax into c_rec_check_receipt_tds_tax;

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

498: (c_rec_rcv_transactions.shipment_header_id, c_rec_rcv_transactions.shipment_line_id,'TDS_SECTION');--rchandan for bug#4428980
499: fetch c_check_receipt_tds_tax into c_rec_check_receipt_tds_tax;
500: close c_check_receipt_tds_tax;
501:
502: p_codepath := jai_general_pkg.plot_codepath(3, p_codepath); /* 3 */
503: if c_rec_check_receipt_tds_tax.section_code is null then
504: /* No TDS tax exists against the receipt line */
505: p_codepath := jai_general_pkg.plot_codepath(4, p_codepath); /* 4 */
506: goto exit_from_procedure;

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

501:
502: p_codepath := jai_general_pkg.plot_codepath(3, p_codepath); /* 3 */
503: if c_rec_check_receipt_tds_tax.section_code is null then
504: /* No TDS tax exists against the receipt line */
505: p_codepath := jai_general_pkg.plot_codepath(4, p_codepath); /* 4 */
506: goto exit_from_procedure;
507: end if;
508:
509: /* Control comes here only when a TDS tax exists against the receipt */

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

512: p_tds_tax_id := c_rec_check_receipt_tds_tax.tax_id;
513: p_default_from := 'Receipt';
514:
515: << exit_from_procedure >>
516: p_codepath := jai_general_pkg.plot_codepath(5, p_codepath, null, 'END'); /* 5 */
517: return;
518:
519: exception
520: when others then

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

572: c_rec_po_taxes c_po_taxes%rowtype;
573:
574: begin
575:
576: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_ap_tds_tax_defaultation.default_tds_from_po', 'START'); /* 1 */
577: open c_po_distributions_all(p_po_distribution_id);
578: fetch c_po_distributions_all into c_rec_po_distributions_all;
579: close c_po_distributions_all;
580:

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

578: fetch c_po_distributions_all into c_rec_po_distributions_all;
579: close c_po_distributions_all;
580:
581: /* Check if TDS type of tax exists against if PO taxes */
582: p_codepath := jai_general_pkg.plot_codepath(2, p_codepath); /* 2 */
583: open c_po_taxes
584: (
585: c_rec_po_distributions_all.po_header_id,
586: c_rec_po_distributions_all.po_line_id,

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

591: close c_po_taxes;
592:
593: if c_rec_po_taxes.section_code is null then
594: /* No TDS tax exists against the receipt line */
595: p_codepath := jai_general_pkg.plot_codepath(3, p_codepath); /* 3 */
596: goto exit_from_procedure;
597: end if;
598:
599: /* Control comes here only when a TDS tax exists against the receipt */

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

601: p_tds_tax_id := c_rec_po_taxes.tax_id;
602: p_default_from := 'PO';
603:
604: << exit_from_procedure >>
605: p_codepath := jai_general_pkg.plot_codepath(4, p_codepath, null, 'END'); /* 4 */
606: return;
607:
608: exception
609: when others then

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

643:
644: begin
645:
646: /* Check from setup for vendor and site */
647: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_ap_tds_tax_defaultation.default_tds_from_setup', 'START'); /* 1 */
648: p_default_from := 'Vendor Site Setup';
649: open c_ja_in_vendor_tds_info_hdr(p_vendor_id, p_vendor_site_id);
650: fetch c_ja_in_vendor_tds_info_hdr into crec_ja_in_vendor_tds_info_hdr;
651: close c_ja_in_vendor_tds_info_hdr;

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

649: open c_ja_in_vendor_tds_info_hdr(p_vendor_id, p_vendor_site_id);
650: fetch c_ja_in_vendor_tds_info_hdr into crec_ja_in_vendor_tds_info_hdr;
651: close c_ja_in_vendor_tds_info_hdr;
652:
653: p_codepath := jai_general_pkg.plot_codepath(2, p_codepath); /* 2 */
654: if crec_ja_in_vendor_tds_info_hdr.tax_id is null and
655: crec_ja_in_vendor_tds_info_hdr.section_code is null
656: then
657: /* No setup exists for site, check for null site */

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

654: if crec_ja_in_vendor_tds_info_hdr.tax_id is null and
655: crec_ja_in_vendor_tds_info_hdr.section_code is null
656: then
657: /* No setup exists for site, check for null site */
658: p_codepath := jai_general_pkg.plot_codepath(3, p_codepath); /* 3 */
659: p_default_from := 'Vendor Null Site Setup';
660:
661: crec_ja_in_vendor_tds_info_hdr := null;
662: open c_ja_in_vendor_tds_info_hdr(p_vendor_id, 0);

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

663: fetch c_ja_in_vendor_tds_info_hdr into crec_ja_in_vendor_tds_info_hdr;
664: close c_ja_in_vendor_tds_info_hdr;
665: end if;
666:
667: p_codepath := jai_general_pkg.plot_codepath(4, p_codepath); /* 4 */
668: if crec_ja_in_vendor_tds_info_hdr.tax_id is not null and
669: crec_ja_in_vendor_tds_info_hdr.section_code is not null
670: then
671:

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

669: crec_ja_in_vendor_tds_info_hdr.section_code is not null
670: then
671:
672: /* Tax has been define as the default */
673: p_codepath := jai_general_pkg.plot_codepath(5, p_codepath); /* 5 */
674: p_tds_section_code := crec_ja_in_vendor_tds_info_hdr.section_code;
675: p_tds_tax_id := crec_ja_in_vendor_tds_info_hdr.tax_id;
676: p_default_type := 'TAX';
677:

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

679: crec_ja_in_vendor_tds_info_hdr.section_code is not null
680: then
681:
682: /* Section has been define as the default */
683: p_codepath := jai_general_pkg.plot_codepath(6, p_codepath); /* 6 */
684: p_tds_section_code := crec_ja_in_vendor_tds_info_hdr.section_code;
685: p_default_type := 'SECTION';
686:
687: else

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

686:
687: else
688:
689: /* No Default has been setup for the vendor */
690: p_codepath := jai_general_pkg.plot_codepath(8, p_codepath); /* 8 */
691: goto exit_from_procedure;
692:
693: end if;
694:

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

693: end if;
694:
695:
696: << exit_from_procedure >>
697: p_codepath := jai_general_pkg.plot_codepath(9, p_codepath, null, 'END'); /* 9 */
698: return;
699:
700: exception
701: when others then

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

737: lv_check_section_applicable varchar2(1);
738:
739: begin
740:
741: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_ap_tds_tax_defaultation.validate_default_tds', 'START'); /* 1 */
742: open c_ja_in_vendor_tds_info_hdr(p_vendor_id, p_vendor_site_id);
743: fetch c_ja_in_vendor_tds_info_hdr into lv_confirm_pan_flag;
744: close c_ja_in_vendor_tds_info_hdr;
745:

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

742: open c_ja_in_vendor_tds_info_hdr(p_vendor_id, p_vendor_site_id);
743: fetch c_ja_in_vendor_tds_info_hdr into lv_confirm_pan_flag;
744: close c_ja_in_vendor_tds_info_hdr;
745:
746: p_codepath := jai_general_pkg.plot_codepath(2, p_codepath); /* 2 */
747: if lv_confirm_pan_flag = 'N' then
748: p_codepath := jai_general_pkg.plot_codepath(3, p_codepath); /* 3 */
749: p_process_flag := 'V';
750: P_process_message := 'PAN of the vendor site not confirmed';

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

744: close c_ja_in_vendor_tds_info_hdr;
745:
746: p_codepath := jai_general_pkg.plot_codepath(2, p_codepath); /* 2 */
747: if lv_confirm_pan_flag = 'N' then
748: p_codepath := jai_general_pkg.plot_codepath(3, p_codepath); /* 3 */
749: p_process_flag := 'V';
750: P_process_message := 'PAN of the vendor site not confirmed';
751: goto exit_from_procedure;
752: end if;

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

750: P_process_message := 'PAN of the vendor site not confirmed';
751: goto exit_from_procedure;
752: end if;
753:
754: p_codepath := jai_general_pkg.plot_codepath(4, p_codepath); /* 4 */
755:
756:
757: /* Check if section is applicable because of regular setup */
758: p_codepath := jai_general_pkg.plot_codepath(5, p_codepath); /* 5 */

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

754: p_codepath := jai_general_pkg.plot_codepath(4, p_codepath); /* 4 */
755:
756:
757: /* Check if section is applicable because of regular setup */
758: p_codepath := jai_general_pkg.plot_codepath(5, p_codepath); /* 5 */
759: open c_check_section_applicable(p_vendor_id, p_vendor_site_id, p_tds_section_code,'TDS_SECTION' );
760: fetch c_check_section_applicable into lv_check_section_applicable;
761: close c_check_section_applicable;
762:

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

760: fetch c_check_section_applicable into lv_check_section_applicable;
761: close c_check_section_applicable;
762:
763: if nvl(lv_check_section_applicable, 'N') <> 'Y' then
764: p_codepath := jai_general_pkg.plot_codepath(7, p_codepath); /* 7 */
765: p_process_flag := 'V';
766: P_process_message := 'Section is not applicable to the vendor and / or site';
767: end if;
768:

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

767: end if;
768:
769:
770: << exit_from_procedure >>
771: p_codepath := jai_general_pkg.plot_codepath(8, p_codepath, null, 'END'); /* 8 */
772: return;
773:
774: exception
775: when others then

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

843: ln_check_if_tax_is_input :=0;
844: lv_consider_for_redefault := 'N';
845: lv_user_deleted_tax_flag := 'N';
846:
847: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_ap_tds_tax_defaultation.populate_localization_inv_tax', 'START'); /* 2 */
848:
849: ln_default_tax_id := p_default_tax_id;
850: ln_actual_tax_id := to_number(p_input_dff_value);
851:

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

864: p_codepath => p_codepath
865: );
866:
867: if lv_input_dff_value = 'NO TDS' then
868: p_codepath := jai_general_pkg.plot_codepath(6.1, p_codepath); /* 6.1 */
869: lv_user_deleted_tax_flag := 'Y';
870: elsif lv_input_dff_value is not null then
871: ln_actual_tax_id := to_number(lv_input_dff_value);
872: /*Added below elsif condition for bug#7309921 by JMEENA */

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

883: /* If default value is SECTION check the default and the given tax */
884: --Added condition and lv_user_deleted_tax_flag <>'Y' for bug#7309921 by JMEENA
885: if p_default_type = 'SECTION' and p_default_section_code is not null and lv_user_deleted_tax_flag <>'Y' then
886:
887: p_codepath := jai_general_pkg.plot_codepath(4, p_codepath); /* 4 */
888:
889: get_default_tax_from_section
890: (
891: p_invoice_id => p_invoice_id ,

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

913: /* Value for consider_for_redefault */
914: if ln_actual_tax_id is null and lv_user_deleted_tax_flag <> 'Y' and p_default_from not in ('PO', 'Receipt') then
915: /* User has not given any input, or also has not specifically deleted the defaulted value or
916: default is not because of PO or Receipt */
917: p_codepath := jai_general_pkg.plot_codepath(14, p_codepath); /* 14 */
918: if p_default_type = 'SECTION' then
919: lv_consider_for_redefault := 'Y';
920: p_codepath := jai_general_pkg.plot_codepath(15, p_codepath); /* 15 */
921: end if;

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

916: default is not because of PO or Receipt */
917: p_codepath := jai_general_pkg.plot_codepath(14, p_codepath); /* 14 */
918: if p_default_type = 'SECTION' then
919: lv_consider_for_redefault := 'Y';
920: p_codepath := jai_general_pkg.plot_codepath(15, p_codepath); /* 15 */
921: end if;
922: end if;
923: /* Value for consider_for_redefault */
924:

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

923: /* Value for consider_for_redefault */
924:
925: end if; /* if p_section_type */
926:
927: p_codepath := jai_general_pkg.plot_codepath(19, p_codepath); /* 19 */
928: open c_check_if_record_exists(p_invoice_id, p_invoice_line_number, p_invoice_distribution_id);
929: fetch c_check_if_record_exists into ln_tds_inv_tax_id;
930: close c_check_if_record_exists;
931:

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

930: close c_check_if_record_exists;
931:
932: if ln_tds_inv_tax_id is null then
933:
934: p_codepath := jai_general_pkg.plot_codepath(20, p_codepath); /* 20 */
935: lv_process_status := 'D';
936: insert into jai_ap_tds_inv_taxes
937: (
938: tds_inv_tax_id ,

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

993: );
994:
995: else
996:
997: p_codepath := jai_general_pkg.plot_codepath(21, p_codepath); /* 21 */
998:
999: update jai_ap_tds_inv_taxes
1000: set amount = p_amount ,
1001: section_type = p_section_type ,

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

1021:
1022:
1023: if lv_consider_for_redefault = 'Y' and p_section_type = 'TDS_SECTION' then
1024:
1025: p_codepath := jai_general_pkg.plot_codepath(22, p_codepath); /* 22 */
1026:
1027: update jai_ap_tds_inv_taxes
1028: set default_tax_id = ln_default_tax_id
1029: where tds_inv_tax_id <> ln_tds_inv_tax_id

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

1034:
1035: end if; /* lv_consider_for_redefault = 'Y' */
1036:
1037: if p_section_type = 'TDS_SECTION' then
1038: p_codepath := jai_general_pkg.plot_codepath(23, p_codepath); /* 23 */
1039: p_final_tds_tax_id := nvl(ln_actual_tax_id, ln_default_tax_id);
1040: end if;
1041:
1042: p_codepath := jai_general_pkg.plot_codepath(100, p_codepath, NULL, 'END'); /*100 */

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

1038: p_codepath := jai_general_pkg.plot_codepath(23, p_codepath); /* 23 */
1039: p_final_tds_tax_id := nvl(ln_actual_tax_id, ln_default_tax_id);
1040: end if;
1041:
1042: p_codepath := jai_general_pkg.plot_codepath(100, p_codepath, NULL, 'END'); /*100 */
1043: return;
1044:
1045: exception
1046: when others then

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

1195:
1196:
1197: begin
1198:
1199: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_ap_tds_tax_defaultation.get_default_tax_from_section', 'START'); /* 1 */
1200:
1201: ln_amount := p_amount * nvl(p_exchange_rate, 1);
1202:
1203:

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

1226:
1227: ln_amount_for_redefault := nvl(ln_amount_for_redefault, 0);
1228: ln_amount_for_redefault := ln_amount_for_redefault * nvl(p_exchange_rate, 1);
1229:
1230: p_codepath := jai_general_pkg.plot_codepath(2, p_codepath); /* 2 */
1231: /* Get threshold id */
1232: open c_get_threshold(p_vendor_id, p_vendor_site_id, p_tds_section_code,'TDS_SECTION');--rchandan for bug#4428980
1233: fetch c_get_threshold into r_get_threshold;
1234: close c_get_threshold;

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

1233: fetch c_get_threshold into r_get_threshold;
1234: close c_get_threshold;
1235:
1236:
1237: p_codepath := jai_general_pkg.plot_codepath(3, p_codepath); /* 3 */
1238: if r_get_threshold.threshold_hdr_id is null then
1239: /* No threshold has been setup for the section and vendor,
1240: it is not possible to default a tax from section */
1241: p_codepath := jai_general_pkg.plot_codepath(4, p_codepath); /* 4 */

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

1237: p_codepath := jai_general_pkg.plot_codepath(3, p_codepath); /* 3 */
1238: if r_get_threshold.threshold_hdr_id is null then
1239: /* No threshold has been setup for the section and vendor,
1240: it is not possible to default a tax from section */
1241: p_codepath := jai_general_pkg.plot_codepath(4, p_codepath); /* 4 */
1242: p_tds_tax_id := null;
1243: goto exit_from_procedure;
1244: end if;
1245:

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

1243: goto exit_from_procedure;
1244: end if;
1245:
1246: /* Get threshold group id */
1247: p_codepath := jai_general_pkg.plot_codepath(5, p_codepath); /* 5 */
1248: open c_get_threshold_group(p_vendor_id, lv_tan_no, lv_pan_no, p_tds_section_code, ln_fin_year,'TDS_SECTION');
1249: fetch c_get_threshold_group into ln_threshold_grp_id;
1250: close c_get_threshold_group;
1251:

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

1251:
1252: /* if there is no threshold group details,
1253: it means no transaction has happened for that section and vendor combination */
1254: if ln_threshold_grp_id is not null then
1255: p_codepath := jai_general_pkg.plot_codepath(6, p_codepath); /* 6 */
1256: open c_jai_ap_tds_thhold_grps(ln_threshold_grp_id);
1257: fetch c_jai_ap_tds_thhold_grps into ln_total_invoice_amount;
1258: close c_jai_ap_tds_thhold_grps;
1259: p_threshold_grp_id := ln_threshold_grp_id;

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

1260: end if;
1261:
1262: ln_total_invoice_amount := nvl(ln_total_invoice_amount, 0 ) ;
1263:
1264: p_codepath := jai_general_pkg.plot_codepath(7, p_codepath); /* 7 */
1265: /* Check if Cumulative threshold is reached */
1266: open c_jai_ap_tds_thhold_slabs
1267: (r_get_threshold.threshold_hdr_id, 'CUMULATIVE', ln_total_invoice_amount + ln_amount + ln_amount_for_redefault);
1268: fetch c_jai_ap_tds_thhold_slabs into r_jai_ap_tds_thhold_slabs;

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

1267: (r_get_threshold.threshold_hdr_id, 'CUMULATIVE', ln_total_invoice_amount + ln_amount + ln_amount_for_redefault);
1268: fetch c_jai_ap_tds_thhold_slabs into r_jai_ap_tds_thhold_slabs;
1269: close c_jai_ap_tds_thhold_slabs;
1270:
1271: p_codepath := jai_general_pkg.plot_codepath(8, p_codepath); /* 8 */
1272:
1273: p_cumulative_threshold_slab_id := r_jai_ap_tds_thhold_slabs.threshold_slab_id;
1274:
1275: if ln_total_invoice_amount >= r_jai_ap_tds_thhold_slabs.from_amount then

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

1273: p_cumulative_threshold_slab_id := r_jai_ap_tds_thhold_slabs.threshold_slab_id;
1274:
1275: if ln_total_invoice_amount >= r_jai_ap_tds_thhold_slabs.from_amount then
1276: /* Cumulative threshold amount is already reached */
1277: p_codepath := jai_general_pkg.plot_codepath(9, p_codepath); /* 9 */
1278: p_cumulative_threshold_stage := 'AFTER THRESHOLD';
1279:
1280: elsif (ln_total_invoice_amount + ln_amount + ln_amount_for_redefault) >= r_jai_ap_tds_thhold_slabs.from_amount then
1281:

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

1279:
1280: elsif (ln_total_invoice_amount + ln_amount + ln_amount_for_redefault) >= r_jai_ap_tds_thhold_slabs.from_amount then
1281:
1282: /* Threshold reached with this transaction */
1283: p_codepath := jai_general_pkg.plot_codepath(10, p_codepath); /* 10 */
1284: p_cumulative_threshold_stage := 'AT THRESHOLD';
1285:
1286: else
1287:

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

1290: /* Cumulative threshold is not reached, default the tax id anyway but
1291: check for SINGLE invoice threshold. This has to be checked with only invoice amount */
1292:
1293: r_jai_ap_tds_thhold_slabs:= null;
1294: p_codepath := jai_general_pkg.plot_codepath(11, p_codepath); /* 11 */
1295: open c_jai_ap_tds_thhold_slabs(r_get_threshold.threshold_hdr_id, 'SINGLE', ln_amount + ln_amount_for_redefault);
1296: fetch c_jai_ap_tds_thhold_slabs into r_jai_ap_tds_thhold_slabs;
1297: close c_jai_ap_tds_thhold_slabs;
1298:

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

1297: close c_jai_ap_tds_thhold_slabs;
1298:
1299: if ln_amount + ln_amount_for_redefault >= r_jai_ap_tds_thhold_slabs.from_amount then
1300: /* Cumulative threshold amount is reached */
1301: p_codepath := jai_general_pkg.plot_codepath(12, p_codepath); /* 12 */
1302: p_single_threshold_slab_id := r_jai_ap_tds_thhold_slabs.threshold_slab_id;
1303: end if;
1304:
1305: end if; /* Cumulative or single threshold amount */

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

1311:
1312: p_tds_tax_id := r_jai_ap_tds_thhold_taxes.tax_id;
1313:
1314: << exit_from_procedure >>
1315: p_codepath := jai_general_pkg.plot_codepath(13, p_codepath, null, 'END'); /* 13 */
1316: return;
1317:
1318: exception
1319: when others then

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

1356:
1357: begin
1358:
1359: p_codepath :=
1360: jai_general_pkg.plot_codepath(1, p_codepath, 'jai_ap_tds_tax_defaultation.process_input_dff_tds', 'START'); /* 1 */
1361:
1362: p_output_tds_dff_value := p_input_tds_dff_value;
1363:
1364: open c_get_existing_dff_values(p_invoice_id, p_invoice_line_number, p_invoice_distribution_id,'TDS_SECTION');--rchandan for bug#4428980

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

1366: close c_get_existing_dff_values;
1367:
1368: if r_get_existing_dff_values.tds_inv_tax_id is null then
1369: /* TDS defaultation Record does not exist */
1370: p_codepath := jai_general_pkg.plot_codepath(2, p_codepath); /* 2 */
1371: goto exit_from_procedure;
1372: end if;
1373:
1374: /* Control comes here only when defaultation details already exists */

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

1375:
1376: if p_input_tds_dff_value is null then
1377:
1378: /* user has not provided any input or has deleted the defaulted or earlier given value */
1379: p_codepath := jai_general_pkg.plot_codepath(3, p_codepath); /* 3 */
1380:
1381: if r_get_existing_dff_values.default_tax_id is not null or
1382: r_get_existing_dff_values.actual_tax_id is not null then
1383:

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

1380:
1381: if r_get_existing_dff_values.default_tax_id is not null or
1382: r_get_existing_dff_values.actual_tax_id is not null then
1383:
1384: p_codepath := jai_general_pkg.plot_codepath(4, p_codepath); /* 4 */
1385: /* User has deleted the earlier given or defaulted value no TDS should be deducted. */
1386: p_output_tds_dff_value := 'NO TDS';
1387:
1388: end if;

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

1388: end if;
1389:
1390: elsif p_input_tds_dff_value = r_get_existing_dff_values.default_tax_id then
1391: /* User has given the same value as default. Actual can be set to null */
1392: p_codepath := jai_general_pkg.plot_codepath(5, p_codepath); /* 5 */
1393: p_output_tds_dff_value := null;
1394:
1395: end if; /* p_input_tds_dff_value */
1396:

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

1394:
1395: end if; /* p_input_tds_dff_value */
1396:
1397: << exit_from_procedure >>
1398: p_codepath := jai_general_pkg.plot_codepath(100, p_codepath, null, 'END'); /* 100 */
1399: return;
1400:
1401: exception
1402: when others then