DBA Data[Home] [Help]

APPS.JAI_AP_TDS_PREPAYMENTS_PKG dependencies on JAI_AP_TDS_INV_TAXES

Line 70: updated jai_ap_tdS_inv_taxes and jai_ap_tds_thhold_grps

66: gn_tds_rounding_factor
67: gd_tds_rounding_effective_date and function get_rnded_value
68: is created.
69:
70: updated jai_ap_tdS_inv_taxes and jai_ap_tds_thhold_grps
71: withe the rounded values. This is done in procedure
72: process_tds_at_inv_validate and maintain_thhold_grps.
73: In generate_tds_invoices derived the logic for rounding.
74: Added conditions in queries for fetching the taxable

Line 638: cursor c_jai_ap_tds_inv_taxes(p_invoice_id number, p_prepay_distribution_id number,cp_section_type jai_ap_tds_inv_taxes.section_type%type) is

634: p_codepath in out nocopy varchar2
635: )
636: is
637:
638: cursor c_jai_ap_tds_inv_taxes(p_invoice_id number, p_prepay_distribution_id number,cp_section_type jai_ap_tds_inv_taxes.section_type%type) is
639: select invoice_distribution_id, amount
640: from jai_ap_tds_inv_taxes
641: where invoice_id = p_invoice_id
642: and invoice_distribution_id <> p_prepay_distribution_id

Line 640: from jai_ap_tds_inv_taxes

636: is
637:
638: cursor c_jai_ap_tds_inv_taxes(p_invoice_id number, p_prepay_distribution_id number,cp_section_type jai_ap_tds_inv_taxes.section_type%type) is
639: select invoice_distribution_id, amount
640: from jai_ap_tds_inv_taxes
641: where invoice_id = p_invoice_id
642: and invoice_distribution_id <> p_prepay_distribution_id
643: and section_type = cp_section_type;
644:

Line 663: /* Loop through to get the taxable basis for each line in jai_ap_tds_inv_taxes */

659: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_ap_tds_prepayemnts_pkg.allocate_prepayment', 'START'); /* 1 */
660:
661: ln_remaining_prepayment_amount := abs(p_prepay_amount); /* Apply amount is negative */
662:
663: /* Loop through to get the taxable basis for each line in jai_ap_tds_inv_taxes */
664: /* It is ok to loop through section_type = 'TDS_SECTION as considering any one section type
665: is ok and tds section will always be there */
666:
667: -- Bug 4754213. Added by Lakshmi Gopalsami

Line 668: for cur_si_distributions_rec in c_jai_ap_tds_inv_taxes(p_invoice_id, p_invoice_distribution_id,'TDS_SECTION')

664: /* It is ok to loop through section_type = 'TDS_SECTION as considering any one section type
665: is ok and tds section will always be there */
666:
667: -- Bug 4754213. Added by Lakshmi Gopalsami
668: for cur_si_distributions_rec in c_jai_ap_tds_inv_taxes(p_invoice_id, p_invoice_distribution_id,'TDS_SECTION')
669: loop
670:
671: ln_already_applied_amount:= 0;
672: ln_effective_available_amount := 0;

Line 723: end loop; /* cur_si_distributions_rec in c_jai_ap_tds_inv_taxes */

719: if ln_remaining_prepayment_amount <= 0 then
720: goto exit_from_procedure;
721: end if;
722:
723: end loop; /* cur_si_distributions_rec in c_jai_ap_tds_inv_taxes */
724:
725:
726: << exit_from_procedure >>
727: p_codepath := jai_general_pkg.plot_codepath(100, p_codepath, null, 'END'); /* 100 */

Line 754: from jai_ap_tds_inv_taxes

750: cursor c_get_tax_details_pp_inv_dist(p_prepay_distribution_id number) is
751: select section_type,
752: actual_section_code section_code,
753: actual_tax_id tax_id
754: from jai_ap_tds_inv_taxes
755: where invoice_distribution_id = p_prepay_distribution_id
756: and actual_tax_id is not null;
757:
758: cursor c_get_tax_details_si_inv_dist(p_invoice_id number, p_invoice_distribution_id number) is

Line 762: from jai_ap_tds_inv_taxes

758: cursor c_get_tax_details_si_inv_dist(p_invoice_id number, p_invoice_distribution_id number) is
759: select section_type,
760: nvl(actual_section_code, default_section_code) section_code,
761: nvl(actual_tax_id, default_tax_id) tax_id
762: from jai_ap_tds_inv_taxes
763: where invoice_id = p_invoice_id
764: and invoice_distribution_id = p_invoice_distribution_id;
765:
766:

Line 778: from jai_ap_tds_inv_taxes

774:
775:
776: cursor c_get_tds_application_basis(p_invoice_id number) is
777: select 'N'
778: from jai_ap_tds_inv_taxes
779: where invoice_id = p_invoice_id
780: and nvl(match_status_flag, 'N') <> 'A';
781:
782:

Line 961: cursor c_get_prepayment_thgroup(p_prepay_distribution_id number,cp_section_type jai_ap_tds_inv_taxes.section_type%type) IS --rchandan for bug#4428980

957: select nvl(tax_rate, 0) tax_rate
958: from JAI_CMN_TAXES_ALL
959: where tax_id = p_tax_id;
960:
961: cursor c_get_prepayment_thgroup(p_prepay_distribution_id number,cp_section_type jai_ap_tds_inv_taxes.section_type%type) IS --rchandan for bug#4428980
962: select threshold_grp_id,
963: actual_tax_id
964: from jai_ap_tds_inv_taxes
965: where invoice_distribution_id = p_prepay_distribution_id

Line 964: from jai_ap_tds_inv_taxes

960:
961: cursor c_get_prepayment_thgroup(p_prepay_distribution_id number,cp_section_type jai_ap_tds_inv_taxes.section_type%type) IS --rchandan for bug#4428980
962: select threshold_grp_id,
963: actual_tax_id
964: from jai_ap_tds_inv_taxes
965: where invoice_distribution_id = p_prepay_distribution_id
966: and section_type = cp_section_type; --rchandan for bug#4428980
967:
968: cursor c_get_pp_section_tax_id(p_prepay_distribution_id number, p_section_type varchar2) is

Line 970: from jai_ap_tds_inv_taxes

966: and section_type = cp_section_type; --rchandan for bug#4428980
967:
968: cursor c_get_pp_section_tax_id(p_prepay_distribution_id number, p_section_type varchar2) is
969: select actual_tax_id
970: from jai_ap_tds_inv_taxes
971: where invoice_distribution_id = p_prepay_distribution_id
972: and section_type = p_section_type;
973:
974:

Line 985: from jai_ap_tds_inv_taxes /* ap_invoice_distributions not used for mutation problem */

981: select invoice_num
982: from ap_invoices_all
983: where invoice_id in
984: ( select invoice_id
985: from jai_ap_tds_inv_taxes /* ap_invoice_distributions not used for mutation problem */
986: where invoice_distribution_id = p_invoice_distribution_id);
987:
988:
989: cursor c_get_total_prepayment_tax

Line 1005: from jai_ap_tds_inv_taxes

1001: /* Bug 4522507. Added by Lakshmi Gopalsami */
1002:
1003: cursor c_get_if_tds_inv_generated_pp(p_prepay_distribution_id number) is
1004: select threshold_trx_id
1005: from jai_ap_tds_inv_taxes
1006: where invoice_distribution_id = p_prepay_distribution_id
1007: -- Bug 4754213. Added by Lakshmi Gopalsami
1008: and section_type = 'TDS_SECTION';
1009:

Line 1017: from jai_ap_tds_inv_taxes

1013: where invoice_id = p_invoice_id
1014: and invoice_distribution_id_prepay = p_invoice_distribution_id
1015: and tds_applicable_flag = 'Y'
1016: and exists (select '1'
1017: from jai_ap_tds_inv_taxes
1018: where invoice_distribution_id = jatp.invoice_distribution_id
1019: -- Bug 4754213. Added by Lakshmi Gopalsami
1020: and section_type = 'TDS_SECTION'
1021: and threshold_trx_id is not null

Line 1051: ln_threshold_trx_id_prepay jai_ap_tds_inv_taxes.threshold_trx_id%type;

1047: ln_pp_section_tax_id number;
1048: ln_threshold_grp_audit_id number;
1049: lv_application_basis jai_ap_tds_prepayments.application_basis%type;
1050: /* Bug 4522507. Added by Lakshmi Gopalsami */
1051: ln_threshold_trx_id_prepay jai_ap_tds_inv_taxes.threshold_trx_id%type;
1052: ln_amt_tds_inv_generated_si number;
1053: --Added the below 6 variables by Sanjikum for Bug#5131075(4718907)
1054: ln_threshold_slab_id jai_ap_tds_thhold_slabs.threshold_slab_id%TYPE;
1055: lv_threshold_type jai_ap_tds_thhold_types.threshold_type%TYPE;

Line 1573: from jai_ap_tds_inv_taxes

1569:
1570: /* Following cursor definition has been changed to cater for the obsoletion of table ja_in_ap_tds_inv_temp */
1571: cursor c_tds_count_unapp(p_invoice_id number, p_section_type varchar2) IS --rchandan for bug#4428980
1572: select count(1)
1573: from jai_ap_tds_inv_taxes
1574: where invoice_id = p_invoice_id
1575: and section_type = p_section_type; --rchandan for bug#4428980
1576:
1577: ln_tds_count_attribute1 number;