DBA Data[Home] [Help]

APPS.JAI_AP_TDS_PREPAYMENTS_PKG dependencies on AP_INVOICES_ALL

Line 546: lv_invoice_to_tds_num ap_invoices_all.invoice_num%type;

542: r_get_total_prepayment_tax c_get_total_prepayment_tax%rowtype;
543: r_tds_details_apply c_tds_details_apply%rowtype;
544: r_gl_sets_of_books c_gl_sets_of_books%rowtype;
545:
546: lv_invoice_to_tds_num ap_invoices_all.invoice_num%type;
547: lv_invoice_to_vendor_num ap_invoices_all.invoice_num%type;
548: ln_threshold_trx_id_apply number;
549: ln_threshold_trx_id_tds number;
550: ln_threshold_trx_id_wct number;

Line 547: lv_invoice_to_vendor_num ap_invoices_all.invoice_num%type;

543: r_tds_details_apply c_tds_details_apply%rowtype;
544: r_gl_sets_of_books c_gl_sets_of_books%rowtype;
545:
546: lv_invoice_to_tds_num ap_invoices_all.invoice_num%type;
547: lv_invoice_to_vendor_num ap_invoices_all.invoice_num%type;
548: ln_threshold_trx_id_apply number;
549: ln_threshold_trx_id_tds number;
550: ln_threshold_trx_id_wct number;
551: ln_threshold_trx_id_essi number;

Line 557: lv_invoice_num_to_tds_apply ap_invoices_all.invoice_num%type;

553: ln_exchange_rate number;
554: ln_tax_id number;
555: ln_threshold_grp_id number;
556: ln_threshold_grp_audit_id number;
557: lv_invoice_num_to_tds_apply ap_invoices_all.invoice_num%type;
558: lv_invoice_num_to_vendor_apply ap_invoices_all.invoice_num%type;
559: /*Bug 5751783 - Start*/
560: ln_parent_pp_invoice_id NUMBER ;
561: ln_threshold_slab_id jai_ap_tds_thhold_slabs.threshold_slab_id%TYPE;

Line 558: lv_invoice_num_to_vendor_apply ap_invoices_all.invoice_num%type;

554: ln_tax_id number;
555: ln_threshold_grp_id number;
556: ln_threshold_grp_audit_id number;
557: lv_invoice_num_to_tds_apply ap_invoices_all.invoice_num%type;
558: lv_invoice_num_to_vendor_apply ap_invoices_all.invoice_num%type;
559: /*Bug 5751783 - Start*/
560: ln_parent_pp_invoice_id NUMBER ;
561: ln_threshold_slab_id jai_ap_tds_thhold_slabs.threshold_slab_id%TYPE;
562: lv_threshold_type jai_ap_tds_thhold_types.threshold_type%TYPE;

Line 568: lv_ppu_tds_inv_num ap_invoices_all.invoice_num%type;

564: lv_after_threshold_type jai_ap_tds_thhold_types.threshold_type%TYPE;
565: ln_temp_threshold_grp_id jai_ap_tds_thhold_grps.threshold_grp_id%TYPE;
566: ln_temp_threshold_hdr_id jai_ap_tds_thhold_hdrs.threshold_hdr_id%TYPE;
567: lv_slab_transition_tds_event jai_ap_tds_thhold_trxs.tds_event%type;
568: lv_ppu_tds_inv_num ap_invoices_all.invoice_num%type;
569: lv_ppu_tds_cm_num ap_invoices_all.invoice_num%type;
570: /*Bug 5751783 - End*/
571: -- Bug 6031679. Added by Lakshmi Gopalsami
572: ln_inv_dist_id_apply ap_invoice_distributions_all.invoice_distribution_id%TYPE ;

Line 569: lv_ppu_tds_cm_num ap_invoices_all.invoice_num%type;

565: ln_temp_threshold_grp_id jai_ap_tds_thhold_grps.threshold_grp_id%TYPE;
566: ln_temp_threshold_hdr_id jai_ap_tds_thhold_hdrs.threshold_hdr_id%TYPE;
567: lv_slab_transition_tds_event jai_ap_tds_thhold_trxs.tds_event%type;
568: lv_ppu_tds_inv_num ap_invoices_all.invoice_num%type;
569: lv_ppu_tds_cm_num ap_invoices_all.invoice_num%type;
570: /*Bug 5751783 - End*/
571: -- Bug 6031679. Added by Lakshmi Gopalsami
572: ln_inv_dist_id_apply ap_invoice_distributions_all.invoice_distribution_id%TYPE ;
573:

Line 1448: cursor c_ap_invoices_all (p_invoice_distribution_id number) is

1444: select nvl(current_threshold_slab_id, 0) current_threshold_slab_id
1445: from jai_ap_tds_thhold_grps
1446: where threshold_grp_id = p_threshold_grp_id;
1447:
1448: cursor c_ap_invoices_all (p_invoice_distribution_id number) is
1449: select invoice_num, invoice_id /*Bug 5751783*/
1450: from ap_invoices_all
1451: where invoice_id in
1452: ( select invoice_id

Line 1450: from ap_invoices_all

1446: where threshold_grp_id = p_threshold_grp_id;
1447:
1448: cursor c_ap_invoices_all (p_invoice_distribution_id number) is
1449: select invoice_num, invoice_id /*Bug 5751783*/
1450: from ap_invoices_all
1451: where invoice_id in
1452: ( select invoice_id
1453: from jai_ap_tds_inv_taxes /* ap_invoice_distributions not used for mutation problem */
1454: where invoice_distribution_id = p_invoice_distribution_id);

Line 1496: cursor c_si_ap_invoices_all (p_invoice_id number) is

1492: and threshold_trx_id is not null
1493: );
1494:
1495: /*Bug 6363056 Start*/
1496: cursor c_si_ap_invoices_all (p_invoice_id number) is
1497: select invoice_num, invoice_id
1498: from ap_invoices_all
1499: where invoice_id = p_invoice_id;
1500:

Line 1498: from ap_invoices_all

1494:
1495: /*Bug 6363056 Start*/
1496: cursor c_si_ap_invoices_all (p_invoice_id number) is
1497: select invoice_num, invoice_id
1498: from ap_invoices_all
1499: where invoice_id = p_invoice_id;
1500:
1501: CURSOR c_get_thgrp_det ( p_threshold_grp_id NUMBER ) IS
1502: SELECT *

Line 1571: lv_invoice_to_tds_num ap_invoices_all.invoice_num%type;

1567: ln_total_tds_amount number;
1568: ln_current_threshold_slab_id jai_ap_tds_thhold_grps.current_threshold_slab_id%type;
1569: ln_prepay_tax_id number;
1570:
1571: lv_invoice_to_tds_num ap_invoices_all.invoice_num%type;
1572: lv_invoice_to_vendor_num ap_invoices_all.invoice_num%type;
1573: lv_invoice_num_prepay_apply ap_invoices_all.invoice_num%type;
1574: ln_threshold_trx_id_tds number;
1575: ln_threshold_trx_id_wct number;

Line 1572: lv_invoice_to_vendor_num ap_invoices_all.invoice_num%type;

1568: ln_current_threshold_slab_id jai_ap_tds_thhold_grps.current_threshold_slab_id%type;
1569: ln_prepay_tax_id number;
1570:
1571: lv_invoice_to_tds_num ap_invoices_all.invoice_num%type;
1572: lv_invoice_to_vendor_num ap_invoices_all.invoice_num%type;
1573: lv_invoice_num_prepay_apply ap_invoices_all.invoice_num%type;
1574: ln_threshold_trx_id_tds number;
1575: ln_threshold_trx_id_wct number;
1576: ln_threshold_trx_id_essi number;

Line 1573: lv_invoice_num_prepay_apply ap_invoices_all.invoice_num%type;

1569: ln_prepay_tax_id number;
1570:
1571: lv_invoice_to_tds_num ap_invoices_all.invoice_num%type;
1572: lv_invoice_to_vendor_num ap_invoices_all.invoice_num%type;
1573: lv_invoice_num_prepay_apply ap_invoices_all.invoice_num%type;
1574: ln_threshold_trx_id_tds number;
1575: ln_threshold_trx_id_wct number;
1576: ln_threshold_trx_id_essi number;
1577: ln_start_threshold_trx_id number;

Line 2032: OPEN c_si_ap_invoices_all(p_invoice_id);

2028: jai_cmn_utils_pkg.write_fnd_log_msg('jai_ap_tds_prepayments_pkg',' ln_amt_tds_inv_generated_si :'||ln_amt_tds_inv_generated_si);
2029: IF ln_amt_tds_inv_generated_si > 0 THEN
2030: IF lv_application_basis = 'STANDARD INVOICE' THEN
2031: /* get the standard invoice number */
2032: OPEN c_si_ap_invoices_all(p_invoice_id);
2033: FETCH c_si_ap_invoices_all INTO lv_invoice_num_prepay_apply, ln_parent_invoice_id;
2034: CLOSE c_si_ap_invoices_all;
2035: ELSE
2036: /*Bug 8606302 - Start*/

Line 2033: FETCH c_si_ap_invoices_all INTO lv_invoice_num_prepay_apply, ln_parent_invoice_id;

2029: IF ln_amt_tds_inv_generated_si > 0 THEN
2030: IF lv_application_basis = 'STANDARD INVOICE' THEN
2031: /* get the standard invoice number */
2032: OPEN c_si_ap_invoices_all(p_invoice_id);
2033: FETCH c_si_ap_invoices_all INTO lv_invoice_num_prepay_apply, ln_parent_invoice_id;
2034: CLOSE c_si_ap_invoices_all;
2035: ELSE
2036: /*Bug 8606302 - Start*/
2037: /*cursor c_ap_invoices_all would not fetch the Invoice ID if the Prepayment did not

Line 2034: CLOSE c_si_ap_invoices_all;

2030: IF lv_application_basis = 'STANDARD INVOICE' THEN
2031: /* get the standard invoice number */
2032: OPEN c_si_ap_invoices_all(p_invoice_id);
2033: FETCH c_si_ap_invoices_all INTO lv_invoice_num_prepay_apply, ln_parent_invoice_id;
2034: CLOSE c_si_ap_invoices_all;
2035: ELSE
2036: /*Bug 8606302 - Start*/
2037: /*cursor c_ap_invoices_all would not fetch the Invoice ID if the Prepayment did not
2038: suffer TDS when it was validated initially, but only when Threshold was breached

Line 2037: /*cursor c_ap_invoices_all would not fetch the Invoice ID if the Prepayment did not

2033: FETCH c_si_ap_invoices_all INTO lv_invoice_num_prepay_apply, ln_parent_invoice_id;
2034: CLOSE c_si_ap_invoices_all;
2035: ELSE
2036: /*Bug 8606302 - Start*/
2037: /*cursor c_ap_invoices_all would not fetch the Invoice ID if the Prepayment did not
2038: suffer TDS when it was validated initially, but only when Threshold was breached
2039: In the above case there would be no records in jai_ap_tds_inv_taxes with the distribution
2040: ID of the Prepayment Invoice*/
2041: get_prepay_invoice_id(p_prepay_distribution_id, ln_parent_invoice_id);

Line 2042: OPEN c_si_ap_invoices_all (ln_parent_invoice_id);

2038: suffer TDS when it was validated initially, but only when Threshold was breached
2039: In the above case there would be no records in jai_ap_tds_inv_taxes with the distribution
2040: ID of the Prepayment Invoice*/
2041: get_prepay_invoice_id(p_prepay_distribution_id, ln_parent_invoice_id);
2042: OPEN c_si_ap_invoices_all (ln_parent_invoice_id);
2043: FETCH c_si_ap_invoices_all INTO lv_invoice_num_prepay_apply, ln_parent_invoice_id;
2044: CLOSE c_si_ap_invoices_all;
2045: /*Bug 8606302 - End*/
2046: END IF ; /* lv_application_basis*/

Line 2043: FETCH c_si_ap_invoices_all INTO lv_invoice_num_prepay_apply, ln_parent_invoice_id;

2039: In the above case there would be no records in jai_ap_tds_inv_taxes with the distribution
2040: ID of the Prepayment Invoice*/
2041: get_prepay_invoice_id(p_prepay_distribution_id, ln_parent_invoice_id);
2042: OPEN c_si_ap_invoices_all (ln_parent_invoice_id);
2043: FETCH c_si_ap_invoices_all INTO lv_invoice_num_prepay_apply, ln_parent_invoice_id;
2044: CLOSE c_si_ap_invoices_all;
2045: /*Bug 8606302 - End*/
2046: END IF ; /* lv_application_basis*/
2047: end if; /* if ln_amt_tds_inv_generated_si > 0 then */

Line 2044: CLOSE c_si_ap_invoices_all;

2040: ID of the Prepayment Invoice*/
2041: get_prepay_invoice_id(p_prepay_distribution_id, ln_parent_invoice_id);
2042: OPEN c_si_ap_invoices_all (ln_parent_invoice_id);
2043: FETCH c_si_ap_invoices_all INTO lv_invoice_num_prepay_apply, ln_parent_invoice_id;
2044: CLOSE c_si_ap_invoices_all;
2045: /*Bug 8606302 - End*/
2046: END IF ; /* lv_application_basis*/
2047: end if; /* if ln_amt_tds_inv_generated_si > 0 then */
2048: end if ;

Line 2078: OPEN c_si_ap_invoices_all(p_invoice_id);

2074: /*Bug 8431516 - Start*/
2075: IF ln_tot_tds_amt > 0 THEN
2076: IF lv_application_basis = 'STANDARD INVOICE' THEN
2077: /* get the standard invoice number */
2078: OPEN c_si_ap_invoices_all(p_invoice_id);
2079: FETCH c_si_ap_invoices_all INTO lv_invoice_num_prepay_apply, ln_parent_invoice_id;
2080: CLOSE c_si_ap_invoices_all;
2081: ELSE
2082: /*Bug 8606302 - Start*/

Line 2079: FETCH c_si_ap_invoices_all INTO lv_invoice_num_prepay_apply, ln_parent_invoice_id;

2075: IF ln_tot_tds_amt > 0 THEN
2076: IF lv_application_basis = 'STANDARD INVOICE' THEN
2077: /* get the standard invoice number */
2078: OPEN c_si_ap_invoices_all(p_invoice_id);
2079: FETCH c_si_ap_invoices_all INTO lv_invoice_num_prepay_apply, ln_parent_invoice_id;
2080: CLOSE c_si_ap_invoices_all;
2081: ELSE
2082: /*Bug 8606302 - Start*/
2083: /*cursor c_ap_invoices_all would not fetch the Invoice ID if the Prepayment did not

Line 2080: CLOSE c_si_ap_invoices_all;

2076: IF lv_application_basis = 'STANDARD INVOICE' THEN
2077: /* get the standard invoice number */
2078: OPEN c_si_ap_invoices_all(p_invoice_id);
2079: FETCH c_si_ap_invoices_all INTO lv_invoice_num_prepay_apply, ln_parent_invoice_id;
2080: CLOSE c_si_ap_invoices_all;
2081: ELSE
2082: /*Bug 8606302 - Start*/
2083: /*cursor c_ap_invoices_all would not fetch the Invoice ID if the Prepayment did not
2084: suffer TDS when it was validated initially, but only when Threshold was breached

Line 2083: /*cursor c_ap_invoices_all would not fetch the Invoice ID if the Prepayment did not

2079: FETCH c_si_ap_invoices_all INTO lv_invoice_num_prepay_apply, ln_parent_invoice_id;
2080: CLOSE c_si_ap_invoices_all;
2081: ELSE
2082: /*Bug 8606302 - Start*/
2083: /*cursor c_ap_invoices_all would not fetch the Invoice ID if the Prepayment did not
2084: suffer TDS when it was validated initially, but only when Threshold was breached
2085: In the above case there would be no records in jai_ap_tds_inv_taxes with the distribution
2086: ID of the Prepayment Invoice*/
2087: get_prepay_invoice_id(p_prepay_distribution_id, ln_parent_invoice_id);

Line 2088: OPEN c_si_ap_invoices_all (ln_parent_invoice_id);

2084: suffer TDS when it was validated initially, but only when Threshold was breached
2085: In the above case there would be no records in jai_ap_tds_inv_taxes with the distribution
2086: ID of the Prepayment Invoice*/
2087: get_prepay_invoice_id(p_prepay_distribution_id, ln_parent_invoice_id);
2088: OPEN c_si_ap_invoices_all (ln_parent_invoice_id);
2089: FETCH c_si_ap_invoices_all INTO lv_invoice_num_prepay_apply, ln_parent_invoice_id;
2090: CLOSE c_si_ap_invoices_all;
2091: /*Bug 8606302 - End*/
2092: END IF ; /* lv_application_basis*/

Line 2089: FETCH c_si_ap_invoices_all INTO lv_invoice_num_prepay_apply, ln_parent_invoice_id;

2085: In the above case there would be no records in jai_ap_tds_inv_taxes with the distribution
2086: ID of the Prepayment Invoice*/
2087: get_prepay_invoice_id(p_prepay_distribution_id, ln_parent_invoice_id);
2088: OPEN c_si_ap_invoices_all (ln_parent_invoice_id);
2089: FETCH c_si_ap_invoices_all INTO lv_invoice_num_prepay_apply, ln_parent_invoice_id;
2090: CLOSE c_si_ap_invoices_all;
2091: /*Bug 8606302 - End*/
2092: END IF ; /* lv_application_basis*/
2093:

Line 2090: CLOSE c_si_ap_invoices_all;

2086: ID of the Prepayment Invoice*/
2087: get_prepay_invoice_id(p_prepay_distribution_id, ln_parent_invoice_id);
2088: OPEN c_si_ap_invoices_all (ln_parent_invoice_id);
2089: FETCH c_si_ap_invoices_all INTO lv_invoice_num_prepay_apply, ln_parent_invoice_id;
2090: CLOSE c_si_ap_invoices_all;
2091: /*Bug 8606302 - End*/
2092: END IF ; /* lv_application_basis*/
2093:
2094: fnd_file.put_line(FND_FILE.log, ' value of dist id '|| p_invoice_distribution_id);