DBA Data[Home] [Help]

APPS.JAI_AP_TDS_TAX_DEFAULTATION dependencies on JAI_AP_TDS_THHOLD_SLABS

Line 1400: cursor c_jai_ap_tds_thhold_slabs

1396: total_invoice_amount
1397: from jai_ap_tds_thhold_grps
1398: where threshold_grp_id = p_threshold_grp_id;
1399:
1400: cursor c_jai_ap_tds_thhold_slabs
1401: ( p_threshold_hdr_id number, p_threshold_type varchar2, p_amount number) is
1402: select threshold_slab_id, threshold_type_id, from_amount, to_amount
1403: from jai_ap_tds_thhold_slabs
1404: where threshold_hdr_id = p_threshold_hdr_id

Line 1403: from jai_ap_tds_thhold_slabs

1399:
1400: cursor c_jai_ap_tds_thhold_slabs
1401: ( p_threshold_hdr_id number, p_threshold_type varchar2, p_amount number) is
1402: select threshold_slab_id, threshold_type_id, from_amount, to_amount
1403: from jai_ap_tds_thhold_slabs
1404: where threshold_hdr_id = p_threshold_hdr_id
1405: and threshold_type_id in
1406: ( select threshold_type_id
1407: from jai_ap_tds_thhold_types

Line 1478: r_jai_ap_tds_thhold_slabs c_jai_ap_tds_thhold_slabs%rowtype;

1474: FROM ap_invoices_all
1475: WHERE invoice_id = p_invoice_id;
1476:
1477: r_get_threshold c_get_threshold%rowtype;
1478: r_jai_ap_tds_thhold_slabs c_jai_ap_tds_thhold_slabs%rowtype;
1479: r_jai_ap_tds_thhold_taxes c_jai_ap_tds_thhold_taxes%rowtype;
1480:
1481: lv_pan_no jai_ap_tds_vendor_hdrs.pan_no%type;
1482: lv_tan_no jai_ap_tds_org_tan_v.org_tan_num %type;--- JAI_AP_TDS_ORG_TANS is changed to view jai_ap_tds_org_tan_v 4323338

Line 1562: open c_jai_ap_tds_thhold_slabs

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;
1565: close c_jai_ap_tds_thhold_slabs;
1566:

Line 1564: fetch c_jai_ap_tds_thhold_slabs into r_jai_ap_tds_thhold_slabs;

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;
1565: close c_jai_ap_tds_thhold_slabs;
1566:
1567: p_codepath := jai_general_pkg.plot_codepath(8, p_codepath); /* 8 */
1568:

Line 1565: close c_jai_ap_tds_thhold_slabs;

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;
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;

Line 1569: p_cumulative_threshold_slab_id := r_jai_ap_tds_thhold_slabs.threshold_slab_id;

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
1572: /* Cumulative threshold amount is already reached */
1573: p_codepath := jai_general_pkg.plot_codepath(9, p_codepath); /* 9 */

Line 1571: if ln_total_invoice_amount >= r_jai_ap_tds_thhold_slabs.from_amount then

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
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:

Line 1576: elsif (ln_total_invoice_amount + ln_amount + ln_amount_for_redefault) >= 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:
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';

Line 1589: r_jai_ap_tds_thhold_slabs:= null;

1585:
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;

Line 1597: open c_jai_ap_tds_thhold_slabs(r_get_threshold.threshold_hdr_id, 'SINGLE', ln_invoice_amount);

1593: OPEN c_get_invoice_amount;
1594: FETCH c_get_invoice_amount INTO ln_invoice_amount;
1595: CLOSE c_get_invoice_amount;
1596:
1597: open c_jai_ap_tds_thhold_slabs(r_get_threshold.threshold_hdr_id, 'SINGLE', ln_invoice_amount);
1598: fetch c_jai_ap_tds_thhold_slabs into r_jai_ap_tds_thhold_slabs;
1599: close c_jai_ap_tds_thhold_slabs;
1600:
1601: if ln_invoice_amount >= r_jai_ap_tds_thhold_slabs.from_amount then

Line 1598: fetch c_jai_ap_tds_thhold_slabs into r_jai_ap_tds_thhold_slabs;

1594: FETCH c_get_invoice_amount INTO ln_invoice_amount;
1595: CLOSE c_get_invoice_amount;
1596:
1597: open c_jai_ap_tds_thhold_slabs(r_get_threshold.threshold_hdr_id, 'SINGLE', ln_invoice_amount);
1598: fetch c_jai_ap_tds_thhold_slabs into r_jai_ap_tds_thhold_slabs;
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 */

Line 1599: close c_jai_ap_tds_thhold_slabs;

1595: CLOSE c_get_invoice_amount;
1596:
1597: open c_jai_ap_tds_thhold_slabs(r_get_threshold.threshold_hdr_id, 'SINGLE', ln_invoice_amount);
1598: fetch c_jai_ap_tds_thhold_slabs into r_jai_ap_tds_thhold_slabs;
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 */

Line 1601: if ln_invoice_amount >= r_jai_ap_tds_thhold_slabs.from_amount then

1597: open c_jai_ap_tds_thhold_slabs(r_get_threshold.threshold_hdr_id, 'SINGLE', ln_invoice_amount);
1598: fetch c_jai_ap_tds_thhold_slabs into r_jai_ap_tds_thhold_slabs;
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;

Line 1604: p_single_threshold_slab_id := r_jai_ap_tds_thhold_slabs.threshold_slab_id;

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 */
1608: