DBA Data[Home] [Help]

APPS.JAI_AP_DTC_GENERATION_PKG dependencies on JAI_AP_TDS_THHOLD_SLABS

Line 34: 3) Update cursor c_jai_ap_tds_thhold_slabs_new to get slab for multi rate

30: b) Call defaultation procedure with 'Y,Y' to redefaultation all.
31: c) Pass p_call_from parameter to defaultation procedure.
32: d) Do not add invoice amount to cumulative amount in group information.
33:
34: 3) Update cursor c_jai_ap_tds_thhold_slabs_new to get slab for multi rate
35: a. Added cp_legal_entity_id parameter
36: b. Added alias for table jai_ap_tds_thhold_types. Added table alias prefix to
37: threshold_hdr_id,threshold_type_id.
38: 4) When invoice is prepayment, do not get slab throuth nature accounting.

Line 2505: cursor c_jai_ap_tds_thhold_slabs

2501: from jai_ap_tds_thhold_grps
2502: where threshold_grp_id = p_threshold_grp_id;
2503:
2504:
2505: cursor c_jai_ap_tds_thhold_slabs
2506: ( p_threshold_hdr_id number, p_threshold_type varchar2, p_amount number) is
2507: select threshold_slab_id, threshold_type_id, from_amount, to_amount
2508: from jai_ap_tds_thhold_slabs
2509: where threshold_hdr_id = p_threshold_hdr_id

Line 2508: from jai_ap_tds_thhold_slabs

2504:
2505: cursor c_jai_ap_tds_thhold_slabs
2506: ( p_threshold_hdr_id number, p_threshold_type varchar2, p_amount number) is
2507: select threshold_slab_id, threshold_type_id, from_amount, to_amount
2508: from jai_ap_tds_thhold_slabs
2509: where threshold_hdr_id = p_threshold_hdr_id
2510: and threshold_type_id in
2511: -- ( select threshold_type_id --Commented by Chong for bug#15939571 20130319
2512: --Added by Chong for bug#15939571 20130319 Start

Line 2692: from jai_ap_tds_thhold_slabs jatts,

2688: select jatts.from_amount from_amount,
2689: jatts.tax_rate tax_rate,
2690: jattt.tax_id tax_id,
2691: (jitc.tax_rate-(nvl(jitc.surcharge_rate,0) + nvl(jitc.cess_rate,0) + nvl(jitc.sh_cess_rate,0))) tax_rate_orig
2692: from jai_ap_tds_thhold_slabs jatts,
2693: jai_ap_tds_thhold_taxes jattt,
2694: jai_cmn_taxes_all jitc
2695: where jatts.threshold_slab_id = jattt.threshold_slab_id
2696: and jattt.tax_id = jitc.tax_id

Line 2763: r_jai_ap_tds_thhold_slabs c_jai_ap_tds_thhold_slabs%rowtype;

2759: ln_tax_amount number;
2760: ln_threshold_grp_id number;
2761: lv_vendor_type_lookup_code po_vendors.vendor_type_lookup_code%type;
2762: ln_threshold_hdr_id number;
2763: r_jai_ap_tds_thhold_slabs c_jai_ap_tds_thhold_slabs%rowtype;
2764: ln_total_invoice_amount number;
2765: ln_threshold_slab_id_before number;
2766: ln_threshold_slab_id_after number;
2767: ln_threshold_slab_id_single number;

Line 2914: cursor c_jai_ap_tds_thhold_slabs_new(

2910: where threshold_hdr_id = ln_threshold_hdr_id;
2911:
2912: lv_multiple_rate_setup jai_ap_tds_thhold_hdrs.multiple_rate_setup%type;
2913:
2914: cursor c_jai_ap_tds_thhold_slabs_new(
2915: p_threshold_hdr_id number,
2916: p_threshold_type varchar2,
2917: p_amount number,
2918: p_natural_account varchar2

Line 2922: from jai_ap_tds_thhold_slabs

2918: p_natural_account varchar2
2919: ,p_legal_entity_id JAI_AP_TDS_THHOLD_ACCOUNT.LEGAL_ENTITY_ID%TYPE --Added p_legal_entity_id by Chong for Bug#13802244 2012/09/21
2920: )is
2921: select threshold_slab_id, threshold_type_id, from_amount, to_amount
2922: from jai_ap_tds_thhold_slabs
2923: where threshold_hdr_id = p_threshold_hdr_id
2924: and threshold_type_id in
2925: ( select jattt.threshold_type_id
2926: from jai_ap_tds_thhold_types jattt

Line 4329: open c_jai_ap_tds_thhold_slabs_new(ln_threshold_hdr_id , 'CUMULATIVE' , ln_total_invoice_amount,lv_natural_account ,ln_legal_entity_id);

4325: close c_get_multiple_rate_setup;
4326:
4327:
4328: if(lv_multiple_rate_setup = 'Y' AND lv_default_option = G_NTL_ACC_SEC_MAP)then --Added lv_default_option by Chong for Bug#13802244 2012/09/21
4329: open c_jai_ap_tds_thhold_slabs_new(ln_threshold_hdr_id , 'CUMULATIVE' , ln_total_invoice_amount,lv_natural_account ,ln_legal_entity_id);
4330: --Added ln_legal_entity_id by Chong for Bug#13802244 2012/09/21
4331: fetch c_jai_ap_tds_thhold_slabs_new into r_jai_ap_tds_thhold_slabs;
4332: close c_jai_ap_tds_thhold_slabs_new ;
4333:

Line 4331: fetch c_jai_ap_tds_thhold_slabs_new into r_jai_ap_tds_thhold_slabs;

4327:
4328: if(lv_multiple_rate_setup = 'Y' AND lv_default_option = G_NTL_ACC_SEC_MAP)then --Added lv_default_option by Chong for Bug#13802244 2012/09/21
4329: open c_jai_ap_tds_thhold_slabs_new(ln_threshold_hdr_id , 'CUMULATIVE' , ln_total_invoice_amount,lv_natural_account ,ln_legal_entity_id);
4330: --Added ln_legal_entity_id by Chong for Bug#13802244 2012/09/21
4331: fetch c_jai_ap_tds_thhold_slabs_new into r_jai_ap_tds_thhold_slabs;
4332: close c_jai_ap_tds_thhold_slabs_new ;
4333:
4334: --Added by Chong for bug#16248896 Start
4335: if r_jai_ap_tds_thhold_slabs.threshold_slab_id is null then

Line 4332: close c_jai_ap_tds_thhold_slabs_new ;

4328: if(lv_multiple_rate_setup = 'Y' AND lv_default_option = G_NTL_ACC_SEC_MAP)then --Added lv_default_option by Chong for Bug#13802244 2012/09/21
4329: open c_jai_ap_tds_thhold_slabs_new(ln_threshold_hdr_id , 'CUMULATIVE' , ln_total_invoice_amount,lv_natural_account ,ln_legal_entity_id);
4330: --Added ln_legal_entity_id by Chong for Bug#13802244 2012/09/21
4331: fetch c_jai_ap_tds_thhold_slabs_new into r_jai_ap_tds_thhold_slabs;
4332: close c_jai_ap_tds_thhold_slabs_new ;
4333:
4334: --Added by Chong for bug#16248896 Start
4335: if r_jai_ap_tds_thhold_slabs.threshold_slab_id is null then
4336: open c_jai_ap_tds_thhold_slabs(ln_threshold_hdr_id , 'CUMULATIVE' , ln_total_invoice_amount);

Line 4335: if r_jai_ap_tds_thhold_slabs.threshold_slab_id is null then

4331: fetch c_jai_ap_tds_thhold_slabs_new into r_jai_ap_tds_thhold_slabs;
4332: close c_jai_ap_tds_thhold_slabs_new ;
4333:
4334: --Added by Chong for bug#16248896 Start
4335: if r_jai_ap_tds_thhold_slabs.threshold_slab_id is null then
4336: open c_jai_ap_tds_thhold_slabs(ln_threshold_hdr_id , 'CUMULATIVE' , ln_total_invoice_amount);
4337: fetch c_jai_ap_tds_thhold_slabs into r_jai_ap_tds_thhold_slabs;
4338: close c_jai_ap_tds_thhold_slabs;
4339: end if;

Line 4336: open c_jai_ap_tds_thhold_slabs(ln_threshold_hdr_id , 'CUMULATIVE' , ln_total_invoice_amount);

4332: close c_jai_ap_tds_thhold_slabs_new ;
4333:
4334: --Added by Chong for bug#16248896 Start
4335: if r_jai_ap_tds_thhold_slabs.threshold_slab_id is null then
4336: open c_jai_ap_tds_thhold_slabs(ln_threshold_hdr_id , 'CUMULATIVE' , ln_total_invoice_amount);
4337: fetch c_jai_ap_tds_thhold_slabs into r_jai_ap_tds_thhold_slabs;
4338: close c_jai_ap_tds_thhold_slabs;
4339: end if;
4340: --Added by Chong for bug#16248896 End

Line 4337: fetch c_jai_ap_tds_thhold_slabs into r_jai_ap_tds_thhold_slabs;

4333:
4334: --Added by Chong for bug#16248896 Start
4335: if r_jai_ap_tds_thhold_slabs.threshold_slab_id is null then
4336: open c_jai_ap_tds_thhold_slabs(ln_threshold_hdr_id , 'CUMULATIVE' , ln_total_invoice_amount);
4337: fetch c_jai_ap_tds_thhold_slabs into r_jai_ap_tds_thhold_slabs;
4338: close c_jai_ap_tds_thhold_slabs;
4339: end if;
4340: --Added by Chong for bug#16248896 End
4341: else

Line 4338: close c_jai_ap_tds_thhold_slabs;

4334: --Added by Chong for bug#16248896 Start
4335: if r_jai_ap_tds_thhold_slabs.threshold_slab_id is null then
4336: open c_jai_ap_tds_thhold_slabs(ln_threshold_hdr_id , 'CUMULATIVE' , ln_total_invoice_amount);
4337: fetch c_jai_ap_tds_thhold_slabs into r_jai_ap_tds_thhold_slabs;
4338: close c_jai_ap_tds_thhold_slabs;
4339: end if;
4340: --Added by Chong for bug#16248896 End
4341: else
4342: open c_jai_ap_tds_thhold_slabs(ln_threshold_hdr_id , 'CUMULATIVE' , ln_total_invoice_amount);

Line 4342: open c_jai_ap_tds_thhold_slabs(ln_threshold_hdr_id , 'CUMULATIVE' , ln_total_invoice_amount);

4338: close c_jai_ap_tds_thhold_slabs;
4339: end if;
4340: --Added by Chong for bug#16248896 End
4341: else
4342: open c_jai_ap_tds_thhold_slabs(ln_threshold_hdr_id , 'CUMULATIVE' , ln_total_invoice_amount);
4343: fetch c_jai_ap_tds_thhold_slabs into r_jai_ap_tds_thhold_slabs;
4344: close c_jai_ap_tds_thhold_slabs;
4345: end if;
4346:

Line 4343: fetch c_jai_ap_tds_thhold_slabs into r_jai_ap_tds_thhold_slabs;

4339: end if;
4340: --Added by Chong for bug#16248896 End
4341: else
4342: open c_jai_ap_tds_thhold_slabs(ln_threshold_hdr_id , 'CUMULATIVE' , ln_total_invoice_amount);
4343: fetch c_jai_ap_tds_thhold_slabs into r_jai_ap_tds_thhold_slabs;
4344: close c_jai_ap_tds_thhold_slabs;
4345: end if;
4346:
4347:

Line 4344: close c_jai_ap_tds_thhold_slabs;

4340: --Added by Chong for bug#16248896 End
4341: else
4342: open c_jai_ap_tds_thhold_slabs(ln_threshold_hdr_id , 'CUMULATIVE' , ln_total_invoice_amount);
4343: fetch c_jai_ap_tds_thhold_slabs into r_jai_ap_tds_thhold_slabs;
4344: close c_jai_ap_tds_thhold_slabs;
4345: end if;
4346:
4347:
4348: ln_threshold_slab_id_before := nvl(r_jai_ap_tds_thhold_slabs.threshold_slab_id, 0);

Line 4348: ln_threshold_slab_id_before := nvl(r_jai_ap_tds_thhold_slabs.threshold_slab_id, 0);

4344: close c_jai_ap_tds_thhold_slabs;
4345: end if;
4346:
4347:
4348: ln_threshold_slab_id_before := nvl(r_jai_ap_tds_thhold_slabs.threshold_slab_id, 0);
4349:
4350: IF ( ln_proc_level >= ln_dbg_level)
4351: THEN
4352:

Line 4364: r_jai_ap_tds_thhold_slabs := null;

4360:
4361: /* Get the threshold position after this invoice impact */
4362: p_codepath := jai_general_pkg.plot_codepath(16, p_codepath); /* 16 */
4363:
4364: r_jai_ap_tds_thhold_slabs := null;
4365:
4366: --Added by Chong for Bug#13802244 2012/09/17 Start
4367: -------------------------------------------------------------------------------------------
4368: r_jai_ap_tds_thhold_grps := null;

Line 4378: open c_jai_ap_tds_thhold_slabs_new(

4374: --Added by Chong for Bug#13802244 2012/09/17 End
4375:
4376:
4377: if(lv_multiple_rate_setup = 'Y' AND lv_default_option = G_NTL_ACC_SEC_MAP)then --Added lv_default_option by Chong for Bug#13802244 2012/09/21
4378: open c_jai_ap_tds_thhold_slabs_new(
4379: ln_threshold_hdr_id ,
4380: 'CUMULATIVE' ,
4381: --ln_total_invoice_amount + cur_rec_section.invoice_amount, --Commented by Chong for Bug#13802244 2012/09/17
4382: ln_total_invoice_amount, --Added by Chong for Bug#13802244 2012/09/17

Line 4386: fetch c_jai_ap_tds_thhold_slabs_new into r_jai_ap_tds_thhold_slabs;

4382: ln_total_invoice_amount, --Added by Chong for Bug#13802244 2012/09/17
4383: lv_natural_account,
4384: ln_legal_entity_id --Added ln_legal_entity_id by Chong for Bug#13802244 2012/09/21
4385: );
4386: fetch c_jai_ap_tds_thhold_slabs_new into r_jai_ap_tds_thhold_slabs;
4387: close c_jai_ap_tds_thhold_slabs_new;
4388:
4389: --Added by Chong for bug#16248896 Start
4390: if r_jai_ap_tds_thhold_slabs.threshold_slab_id is null then

Line 4387: close c_jai_ap_tds_thhold_slabs_new;

4383: lv_natural_account,
4384: ln_legal_entity_id --Added ln_legal_entity_id by Chong for Bug#13802244 2012/09/21
4385: );
4386: fetch c_jai_ap_tds_thhold_slabs_new into r_jai_ap_tds_thhold_slabs;
4387: close c_jai_ap_tds_thhold_slabs_new;
4388:
4389: --Added by Chong for bug#16248896 Start
4390: if r_jai_ap_tds_thhold_slabs.threshold_slab_id is null then
4391: open c_jai_ap_tds_thhold_slabs(

Line 4390: if r_jai_ap_tds_thhold_slabs.threshold_slab_id is null then

4386: fetch c_jai_ap_tds_thhold_slabs_new into r_jai_ap_tds_thhold_slabs;
4387: close c_jai_ap_tds_thhold_slabs_new;
4388:
4389: --Added by Chong for bug#16248896 Start
4390: if r_jai_ap_tds_thhold_slabs.threshold_slab_id is null then
4391: open c_jai_ap_tds_thhold_slabs(
4392: ln_threshold_hdr_id ,
4393: 'CUMULATIVE' ,
4394: ln_total_invoice_amount

Line 4391: open c_jai_ap_tds_thhold_slabs(

4387: close c_jai_ap_tds_thhold_slabs_new;
4388:
4389: --Added by Chong for bug#16248896 Start
4390: if r_jai_ap_tds_thhold_slabs.threshold_slab_id is null then
4391: open c_jai_ap_tds_thhold_slabs(
4392: ln_threshold_hdr_id ,
4393: 'CUMULATIVE' ,
4394: ln_total_invoice_amount
4395: );

Line 4396: fetch c_jai_ap_tds_thhold_slabs into r_jai_ap_tds_thhold_slabs;

4392: ln_threshold_hdr_id ,
4393: 'CUMULATIVE' ,
4394: ln_total_invoice_amount
4395: );
4396: fetch c_jai_ap_tds_thhold_slabs into r_jai_ap_tds_thhold_slabs;
4397: close c_jai_ap_tds_thhold_slabs;
4398: end if;
4399: --Added by Chong for bug#16248896 End
4400: else

Line 4397: close c_jai_ap_tds_thhold_slabs;

4393: 'CUMULATIVE' ,
4394: ln_total_invoice_amount
4395: );
4396: fetch c_jai_ap_tds_thhold_slabs into r_jai_ap_tds_thhold_slabs;
4397: close c_jai_ap_tds_thhold_slabs;
4398: end if;
4399: --Added by Chong for bug#16248896 End
4400: else
4401: open c_jai_ap_tds_thhold_slabs(

Line 4401: open c_jai_ap_tds_thhold_slabs(

4397: close c_jai_ap_tds_thhold_slabs;
4398: end if;
4399: --Added by Chong for bug#16248896 End
4400: else
4401: open c_jai_ap_tds_thhold_slabs(
4402: ln_threshold_hdr_id ,
4403: 'CUMULATIVE' ,
4404: --ln_total_invoice_amount + cur_rec_section.invoice_amount --Commented by Chong for Bug#13802244 2012/09/17
4405: ln_total_invoice_amount --Added by Chong for Bug#13802244 2012/09/17

Line 4407: fetch c_jai_ap_tds_thhold_slabs into r_jai_ap_tds_thhold_slabs;

4403: 'CUMULATIVE' ,
4404: --ln_total_invoice_amount + cur_rec_section.invoice_amount --Commented by Chong for Bug#13802244 2012/09/17
4405: ln_total_invoice_amount --Added by Chong for Bug#13802244 2012/09/17
4406: );
4407: fetch c_jai_ap_tds_thhold_slabs into r_jai_ap_tds_thhold_slabs;
4408: close c_jai_ap_tds_thhold_slabs;
4409: end if;
4410:
4411:

Line 4408: close c_jai_ap_tds_thhold_slabs;

4404: --ln_total_invoice_amount + cur_rec_section.invoice_amount --Commented by Chong for Bug#13802244 2012/09/17
4405: ln_total_invoice_amount --Added by Chong for Bug#13802244 2012/09/17
4406: );
4407: fetch c_jai_ap_tds_thhold_slabs into r_jai_ap_tds_thhold_slabs;
4408: close c_jai_ap_tds_thhold_slabs;
4409: end if;
4410:
4411:
4412:

Line 4413: ln_threshold_slab_id_after := nvl(r_jai_ap_tds_thhold_slabs.threshold_slab_id, 0);

4409: end if;
4410:
4411:
4412:
4413: ln_threshold_slab_id_after := nvl(r_jai_ap_tds_thhold_slabs.threshold_slab_id, 0);
4414: IF ( ln_proc_level >= ln_dbg_level)
4415: THEN
4416:
4417: FND_LOG.STRING ( ln_proc_level

Line 4450: r_jai_ap_tds_thhold_slabs := null;

4446:
4447: /* Check for Single Invoice threshold if cumulative has not been reached */
4448: if lv_generate_all_invoices = 'N' then
4449: /* Cumulative threshold not reached */
4450: r_jai_ap_tds_thhold_slabs := null;
4451:
4452: if(lv_multiple_rate_setup = 'Y' AND lv_default_option = G_NTL_ACC_SEC_MAP)then --Added lv_default_option by Chong for Bug#13802244 2012/09/21
4453: open c_jai_ap_tds_thhold_slabs_new(ln_threshold_hdr_id , 'SINGLE' , cur_rec_section.invoice_amount,lv_natural_account, ln_legal_entity_id);
4454: --Added ln_legal_entity_id by Chong for Bug#13802244 2012/09/21

Line 4453: open c_jai_ap_tds_thhold_slabs_new(ln_threshold_hdr_id , 'SINGLE' , cur_rec_section.invoice_amount,lv_natural_account, ln_legal_entity_id);

4449: /* Cumulative threshold not reached */
4450: r_jai_ap_tds_thhold_slabs := null;
4451:
4452: if(lv_multiple_rate_setup = 'Y' AND lv_default_option = G_NTL_ACC_SEC_MAP)then --Added lv_default_option by Chong for Bug#13802244 2012/09/21
4453: open c_jai_ap_tds_thhold_slabs_new(ln_threshold_hdr_id , 'SINGLE' , cur_rec_section.invoice_amount,lv_natural_account, ln_legal_entity_id);
4454: --Added ln_legal_entity_id by Chong for Bug#13802244 2012/09/21
4455: fetch c_jai_ap_tds_thhold_slabs_new into r_jai_ap_tds_thhold_slabs;
4456: close c_jai_ap_tds_thhold_slabs_new;
4457:

Line 4455: fetch c_jai_ap_tds_thhold_slabs_new into r_jai_ap_tds_thhold_slabs;

4451:
4452: if(lv_multiple_rate_setup = 'Y' AND lv_default_option = G_NTL_ACC_SEC_MAP)then --Added lv_default_option by Chong for Bug#13802244 2012/09/21
4453: open c_jai_ap_tds_thhold_slabs_new(ln_threshold_hdr_id , 'SINGLE' , cur_rec_section.invoice_amount,lv_natural_account, ln_legal_entity_id);
4454: --Added ln_legal_entity_id by Chong for Bug#13802244 2012/09/21
4455: fetch c_jai_ap_tds_thhold_slabs_new into r_jai_ap_tds_thhold_slabs;
4456: close c_jai_ap_tds_thhold_slabs_new;
4457:
4458: --Added by Chong for bug#16248896 Start
4459: if r_jai_ap_tds_thhold_slabs.threshold_slab_id is null then

Line 4456: close c_jai_ap_tds_thhold_slabs_new;

4452: if(lv_multiple_rate_setup = 'Y' AND lv_default_option = G_NTL_ACC_SEC_MAP)then --Added lv_default_option by Chong for Bug#13802244 2012/09/21
4453: open c_jai_ap_tds_thhold_slabs_new(ln_threshold_hdr_id , 'SINGLE' , cur_rec_section.invoice_amount,lv_natural_account, ln_legal_entity_id);
4454: --Added ln_legal_entity_id by Chong for Bug#13802244 2012/09/21
4455: fetch c_jai_ap_tds_thhold_slabs_new into r_jai_ap_tds_thhold_slabs;
4456: close c_jai_ap_tds_thhold_slabs_new;
4457:
4458: --Added by Chong for bug#16248896 Start
4459: if r_jai_ap_tds_thhold_slabs.threshold_slab_id is null then
4460: open c_jai_ap_tds_thhold_slabs(ln_threshold_hdr_id , 'SINGLE' , cur_rec_section.invoice_amount);

Line 4459: if r_jai_ap_tds_thhold_slabs.threshold_slab_id is null then

4455: fetch c_jai_ap_tds_thhold_slabs_new into r_jai_ap_tds_thhold_slabs;
4456: close c_jai_ap_tds_thhold_slabs_new;
4457:
4458: --Added by Chong for bug#16248896 Start
4459: if r_jai_ap_tds_thhold_slabs.threshold_slab_id is null then
4460: open c_jai_ap_tds_thhold_slabs(ln_threshold_hdr_id , 'SINGLE' , cur_rec_section.invoice_amount);
4461: fetch c_jai_ap_tds_thhold_slabs into r_jai_ap_tds_thhold_slabs;
4462: close c_jai_ap_tds_thhold_slabs;
4463: end if;

Line 4460: open c_jai_ap_tds_thhold_slabs(ln_threshold_hdr_id , 'SINGLE' , cur_rec_section.invoice_amount);

4456: close c_jai_ap_tds_thhold_slabs_new;
4457:
4458: --Added by Chong for bug#16248896 Start
4459: if r_jai_ap_tds_thhold_slabs.threshold_slab_id is null then
4460: open c_jai_ap_tds_thhold_slabs(ln_threshold_hdr_id , 'SINGLE' , cur_rec_section.invoice_amount);
4461: fetch c_jai_ap_tds_thhold_slabs into r_jai_ap_tds_thhold_slabs;
4462: close c_jai_ap_tds_thhold_slabs;
4463: end if;
4464: --Added by Chong for bug#16248896 End

Line 4461: fetch c_jai_ap_tds_thhold_slabs into r_jai_ap_tds_thhold_slabs;

4457:
4458: --Added by Chong for bug#16248896 Start
4459: if r_jai_ap_tds_thhold_slabs.threshold_slab_id is null then
4460: open c_jai_ap_tds_thhold_slabs(ln_threshold_hdr_id , 'SINGLE' , cur_rec_section.invoice_amount);
4461: fetch c_jai_ap_tds_thhold_slabs into r_jai_ap_tds_thhold_slabs;
4462: close c_jai_ap_tds_thhold_slabs;
4463: end if;
4464: --Added by Chong for bug#16248896 End
4465: else

Line 4462: close c_jai_ap_tds_thhold_slabs;

4458: --Added by Chong for bug#16248896 Start
4459: if r_jai_ap_tds_thhold_slabs.threshold_slab_id is null then
4460: open c_jai_ap_tds_thhold_slabs(ln_threshold_hdr_id , 'SINGLE' , cur_rec_section.invoice_amount);
4461: fetch c_jai_ap_tds_thhold_slabs into r_jai_ap_tds_thhold_slabs;
4462: close c_jai_ap_tds_thhold_slabs;
4463: end if;
4464: --Added by Chong for bug#16248896 End
4465: else
4466: open c_jai_ap_tds_thhold_slabs(ln_threshold_hdr_id , 'SINGLE' , cur_rec_section.invoice_amount);

Line 4466: open c_jai_ap_tds_thhold_slabs(ln_threshold_hdr_id , 'SINGLE' , cur_rec_section.invoice_amount);

4462: close c_jai_ap_tds_thhold_slabs;
4463: end if;
4464: --Added by Chong for bug#16248896 End
4465: else
4466: open c_jai_ap_tds_thhold_slabs(ln_threshold_hdr_id , 'SINGLE' , cur_rec_section.invoice_amount);
4467: fetch c_jai_ap_tds_thhold_slabs into r_jai_ap_tds_thhold_slabs;
4468: close c_jai_ap_tds_thhold_slabs;
4469: end if;
4470:

Line 4467: fetch c_jai_ap_tds_thhold_slabs into r_jai_ap_tds_thhold_slabs;

4463: end if;
4464: --Added by Chong for bug#16248896 End
4465: else
4466: open c_jai_ap_tds_thhold_slabs(ln_threshold_hdr_id , 'SINGLE' , cur_rec_section.invoice_amount);
4467: fetch c_jai_ap_tds_thhold_slabs into r_jai_ap_tds_thhold_slabs;
4468: close c_jai_ap_tds_thhold_slabs;
4469: end if;
4470:
4471:

Line 4468: close c_jai_ap_tds_thhold_slabs;

4464: --Added by Chong for bug#16248896 End
4465: else
4466: open c_jai_ap_tds_thhold_slabs(ln_threshold_hdr_id , 'SINGLE' , cur_rec_section.invoice_amount);
4467: fetch c_jai_ap_tds_thhold_slabs into r_jai_ap_tds_thhold_slabs;
4468: close c_jai_ap_tds_thhold_slabs;
4469: end if;
4470:
4471:
4472: ln_threshold_slab_id_single := nvl(r_jai_ap_tds_thhold_slabs.threshold_slab_id, 0);

Line 4472: ln_threshold_slab_id_single := nvl(r_jai_ap_tds_thhold_slabs.threshold_slab_id, 0);

4468: close c_jai_ap_tds_thhold_slabs;
4469: end if;
4470:
4471:
4472: ln_threshold_slab_id_single := nvl(r_jai_ap_tds_thhold_slabs.threshold_slab_id, 0);
4473: jai_cmn_utils_pkg.WRITE_FND_LOG(G_LEVEL_STATEMENT, G_MODULE_NAME||l_api_name, '19.1. ln_threshold_slab_id_single: ' || ln_threshold_slab_id_single);
4474: end if;
4475:
4476: --====================================================

Line 5151: JAI_AP_TDS_THHOLD_SLABS JATTS,

5147: --, JATTTA.OPERATING_UNIT_ID
5148: ,jatth.threshold_hdr_id --Added by Chong for bug#16414088 20130313
5149: FROM JAI_AP_TDS_THHOLD_HDRS JATTH,
5150: JAI_AP_TDS_THHOLD_TYPES JATTTY,
5151: JAI_AP_TDS_THHOLD_SLABS JATTS,
5152: JAI_AP_TDS_THHOLD_TAXES JATTTA
5153: WHERE JATTS.THRESHOLD_SLAB_ID = p_threshold_slab_id
5154: AND JATTH.THRESHOLD_HDR_ID = JATTTY.THRESHOLD_HDR_ID
5155: AND JATTTY.THRESHOLD_TYPE_ID = JATTS.THRESHOLD_TYPE_ID

Line 9085: FROM jai_ap_tds_thhold_slabs jatts

9081: jatts.threshold_type_id,
9082: jatts.from_amount,
9083: jatts.to_amount,
9084: jatts.tax_rate
9085: FROM jai_ap_tds_thhold_slabs jatts
9086: ,jai_ap_tds_thhold_account jatta
9087: ,jai_ap_tds_thhold_types jattt
9088: WHERE jatts.threshold_hdr_id = jatta.threshold_hdr_id
9089: AND jatts.threshold_type_id = jatta.threshold_type_id

Line 9101: CURSOR c_jai_ap_tds_thhold_slabs(p_threshold_hdr_id NUMBER,

9097: AND jatts.from_amount <= p_amount
9098: AND NVL(to_amount, p_amount) >= p_amount
9099: ORDER BY from_amount asc;
9100:
9101: CURSOR c_jai_ap_tds_thhold_slabs(p_threshold_hdr_id NUMBER,
9102: p_threshold_type VARCHAR2,
9103: p_amount NUMBER) IS
9104: SELECT threshold_slab_id,
9105: threshold_type_id,

Line 9109: FROM jai_ap_tds_thhold_slabs

9105: threshold_type_id,
9106: from_amount,
9107: to_amount,
9108: tax_rate
9109: FROM jai_ap_tds_thhold_slabs
9110: WHERE threshold_hdr_id = p_threshold_hdr_id
9111: AND threshold_type_id in
9112: -- (SELECT threshold_type_id --Commented by Chong for bug#15939571 20121212
9113: --Added by Chong for bug#15939571 20130313 Start

Line 9130: r_jai_ap_tds_thhold_slabs c_jai_ap_tds_thhold_slabs%ROWTYPE;

9126: ORDER BY from_amount asc;
9127:
9128: r_get_threshold_grp_dtl c_get_threshold_grp_dtl%ROWTYPE;
9129: ln_effective_invoice_amt NUMBER;
9130: r_jai_ap_tds_thhold_slabs c_jai_ap_tds_thhold_slabs%ROWTYPE;
9131: r_get_tds_thhold_slabs_byNt c_get_tds_thhold_slabs_byNt%ROWTYPE;
9132: lv_threshold_type jai_ap_tds_thhold_types.threshold_type%TYPE;
9133: lv_multiple_rate_setup jai_ap_tds_thhold_hdrs.multiple_rate_setup%TYPE;
9134: lv_invoice_distribution_id jai_ap_tds_inv_taxes.invoice_distribution_id%TYPE;

Line 9195: OPEN c_jai_ap_tds_thhold_slabs(p_threshold_hdr_id,

9191: IF lv_multiple_rate_setup = 'N' THEN
9192: /*Multiple_rate_setup OFF*/
9193:
9194: --check if the current amount falls in the cumulative threshold
9195: OPEN c_jai_ap_tds_thhold_slabs(p_threshold_hdr_id,
9196: lv_threshold_type,
9197: ln_effective_invoice_amt);
9198: FETCH c_jai_ap_tds_thhold_slabs
9199: INTO r_jai_ap_tds_thhold_slabs;

Line 9198: FETCH c_jai_ap_tds_thhold_slabs

9194: --check if the current amount falls in the cumulative threshold
9195: OPEN c_jai_ap_tds_thhold_slabs(p_threshold_hdr_id,
9196: lv_threshold_type,
9197: ln_effective_invoice_amt);
9198: FETCH c_jai_ap_tds_thhold_slabs
9199: INTO r_jai_ap_tds_thhold_slabs;
9200: CLOSE c_jai_ap_tds_thhold_slabs;
9201:
9202: /* Commented by Chong.lei for (It's not correct to get single slab for cumulative amount) 2012/01/16

Line 9199: INTO r_jai_ap_tds_thhold_slabs;

9195: OPEN c_jai_ap_tds_thhold_slabs(p_threshold_hdr_id,
9196: lv_threshold_type,
9197: ln_effective_invoice_amt);
9198: FETCH c_jai_ap_tds_thhold_slabs
9199: INTO r_jai_ap_tds_thhold_slabs;
9200: CLOSE c_jai_ap_tds_thhold_slabs;
9201:
9202: /* Commented by Chong.lei for (It's not correct to get single slab for cumulative amount) 2012/01/16
9203: IF r_jai_ap_tds_thhold_slabs.threshold_slab_id IS NULL THEN

Line 9200: CLOSE c_jai_ap_tds_thhold_slabs;

9196: lv_threshold_type,
9197: ln_effective_invoice_amt);
9198: FETCH c_jai_ap_tds_thhold_slabs
9199: INTO r_jai_ap_tds_thhold_slabs;
9200: CLOSE c_jai_ap_tds_thhold_slabs;
9201:
9202: /* Commented by Chong.lei for (It's not correct to get single slab for cumulative amount) 2012/01/16
9203: IF r_jai_ap_tds_thhold_slabs.threshold_slab_id IS NULL THEN
9204:

Line 9203: IF r_jai_ap_tds_thhold_slabs.threshold_slab_id IS NULL THEN

9199: INTO r_jai_ap_tds_thhold_slabs;
9200: CLOSE c_jai_ap_tds_thhold_slabs;
9201:
9202: /* Commented by Chong.lei for (It's not correct to get single slab for cumulative amount) 2012/01/16
9203: IF r_jai_ap_tds_thhold_slabs.threshold_slab_id IS NULL THEN
9204:
9205: lv_threshold_type := 'SINGLE';
9206:
9207: --check if the current amount falls in the single threshold

Line 9208: OPEN c_jai_ap_tds_thhold_slabs(p_threshold_hdr_id,

9204:
9205: lv_threshold_type := 'SINGLE';
9206:
9207: --check if the current amount falls in the single threshold
9208: OPEN c_jai_ap_tds_thhold_slabs(p_threshold_hdr_id,
9209: lv_threshold_type,
9210: 99999999999999);
9211: FETCH c_jai_ap_tds_thhold_slabs
9212: INTO r_jai_ap_tds_thhold_slabs;

Line 9211: FETCH c_jai_ap_tds_thhold_slabs

9207: --check if the current amount falls in the single threshold
9208: OPEN c_jai_ap_tds_thhold_slabs(p_threshold_hdr_id,
9209: lv_threshold_type,
9210: 99999999999999);
9211: FETCH c_jai_ap_tds_thhold_slabs
9212: INTO r_jai_ap_tds_thhold_slabs;
9213: CLOSE c_jai_ap_tds_thhold_slabs;
9214: END IF;
9215: */

Line 9212: INTO r_jai_ap_tds_thhold_slabs;

9208: OPEN c_jai_ap_tds_thhold_slabs(p_threshold_hdr_id,
9209: lv_threshold_type,
9210: 99999999999999);
9211: FETCH c_jai_ap_tds_thhold_slabs
9212: INTO r_jai_ap_tds_thhold_slabs;
9213: CLOSE c_jai_ap_tds_thhold_slabs;
9214: END IF;
9215: */
9216:

Line 9213: CLOSE c_jai_ap_tds_thhold_slabs;

9209: lv_threshold_type,
9210: 99999999999999);
9211: FETCH c_jai_ap_tds_thhold_slabs
9212: INTO r_jai_ap_tds_thhold_slabs;
9213: CLOSE c_jai_ap_tds_thhold_slabs;
9214: END IF;
9215: */
9216:
9217: p_threshold_slab_id := r_jai_ap_tds_thhold_slabs.threshold_slab_id;

Line 9217: p_threshold_slab_id := r_jai_ap_tds_thhold_slabs.threshold_slab_id;

9213: CLOSE c_jai_ap_tds_thhold_slabs;
9214: END IF;
9215: */
9216:
9217: p_threshold_slab_id := r_jai_ap_tds_thhold_slabs.threshold_slab_id;
9218: p_threshold_type := lv_threshold_type;
9219:
9220: ELSE
9221: /*Multiple_rate_setup ON*/

Line 9259: OPEN c_jai_ap_tds_thhold_slabs(p_threshold_hdr_id,

9255: ----------------------------------------------------------------------
9256: --Hook code add here after all cancellation logic processed
9257: IF p_threshold_slab_id IS NULL THEN
9258:
9259: OPEN c_jai_ap_tds_thhold_slabs(p_threshold_hdr_id,
9260: lv_threshold_type,
9261: ln_effective_invoice_amt);
9262: FETCH c_jai_ap_tds_thhold_slabs INTO r_jai_ap_tds_thhold_slabs;
9263: CLOSE c_jai_ap_tds_thhold_slabs;

Line 9262: FETCH c_jai_ap_tds_thhold_slabs INTO r_jai_ap_tds_thhold_slabs;

9258:
9259: OPEN c_jai_ap_tds_thhold_slabs(p_threshold_hdr_id,
9260: lv_threshold_type,
9261: ln_effective_invoice_amt);
9262: FETCH c_jai_ap_tds_thhold_slabs INTO r_jai_ap_tds_thhold_slabs;
9263: CLOSE c_jai_ap_tds_thhold_slabs;
9264: p_threshold_slab_id := r_jai_ap_tds_thhold_slabs.threshold_slab_id;
9265: p_threshold_type := r_get_tds_thhold_slabs_byNt.threshold_type_id;
9266: END IF; --n_threshold_trx_id IS NULL

Line 9263: CLOSE c_jai_ap_tds_thhold_slabs;

9259: OPEN c_jai_ap_tds_thhold_slabs(p_threshold_hdr_id,
9260: lv_threshold_type,
9261: ln_effective_invoice_amt);
9262: FETCH c_jai_ap_tds_thhold_slabs INTO r_jai_ap_tds_thhold_slabs;
9263: CLOSE c_jai_ap_tds_thhold_slabs;
9264: p_threshold_slab_id := r_jai_ap_tds_thhold_slabs.threshold_slab_id;
9265: p_threshold_type := r_get_tds_thhold_slabs_byNt.threshold_type_id;
9266: END IF; --n_threshold_trx_id IS NULL
9267: ----------------------------------------------------------------------

Line 9264: p_threshold_slab_id := r_jai_ap_tds_thhold_slabs.threshold_slab_id;

9260: lv_threshold_type,
9261: ln_effective_invoice_amt);
9262: FETCH c_jai_ap_tds_thhold_slabs INTO r_jai_ap_tds_thhold_slabs;
9263: CLOSE c_jai_ap_tds_thhold_slabs;
9264: p_threshold_slab_id := r_jai_ap_tds_thhold_slabs.threshold_slab_id;
9265: p_threshold_type := r_get_tds_thhold_slabs_byNt.threshold_type_id;
9266: END IF; --n_threshold_trx_id IS NULL
9267: ----------------------------------------------------------------------
9268: --Added by Chong for bug#16414088 eTDS ER End

Line 9446: CURSOR c_get_thrhd_hdr_id(cp_slab_id jai_ap_tds_thhold_slabs.threshold_slab_id%TYPE)

9442: --Added by Chong for Bug#13802244 2012/09/17 End
9443:
9444: --Added by Chong for Bug#13359892 2012/09/27 Start
9445: -----------------------------------------------------------------------------
9446: CURSOR c_get_thrhd_hdr_id(cp_slab_id jai_ap_tds_thhold_slabs.threshold_slab_id%TYPE)
9447: IS
9448: SELECT threshold_hdr_id
9449: FROM jai_ap_tds_thhold_slabs
9450: where threshold_slab_id = cp_slab_id

Line 9449: FROM jai_ap_tds_thhold_slabs

9445: -----------------------------------------------------------------------------
9446: CURSOR c_get_thrhd_hdr_id(cp_slab_id jai_ap_tds_thhold_slabs.threshold_slab_id%TYPE)
9447: IS
9448: SELECT threshold_hdr_id
9449: FROM jai_ap_tds_thhold_slabs
9450: where threshold_slab_id = cp_slab_id
9451: ;
9452:
9453: --Get one surcharge tax from this group