DBA Data[Home] [Help]

APPS.JAI_AR_TCS_REP_PKG dependencies on JAI_RGM_THRESHOLDS

Line 5909: Purpose : Insert the record in jai_rgm_thresholds while booking the sales order

5905: /* **************************************************************************
5906: Creation Date : 01-Aug-2008
5907: Created By : JMEENA
5908: Bug Number : 7277211
5909: Purpose : Insert the record in jai_rgm_thresholds while booking the sales order
5910: Called From : PROCESS_TRANSACTION when p_event is BOOKED (sales order booked)
5911: CHANGE HISTORY:
5912: S.No Date Author and Details
5913:

Line 5930: cursor c_get_threshold_slab ( cp_regime_id jai_rgm_thresholds.regime_id%type,

5926: from JAI_CMN_CUS_ADDRESSES
5927: where customer_id = cp_customer_id
5928: AND tcs_customer_type IS NOT NULL;
5929:
5930: cursor c_get_threshold_slab ( cp_regime_id jai_rgm_thresholds.regime_id%type,
5931: cp_customer_type_lkup_code JAI_CMN_CUS_ADDRESSES.tcs_customer_type%type,
5932: cp_source_trx_date DATE
5933: )
5934: IS

Line 5952: cursor get_jai_rgm_thresholds_count ( cp_fin_year jai_rgm_thresholds.fin_year%type,

5948: and nvl(thtyps.to_date, trunc(cp_source_trx_date))
5949: and NVL(thslbs.from_amount,0) = 0;
5950:
5951:
5952: cursor get_jai_rgm_thresholds_count ( cp_fin_year jai_rgm_thresholds.fin_year%type,
5953: cp_org_tan_no jai_rgm_thresholds.org_tan_no%type,
5954: cp_party_type jai_rgm_thresholds.party_type%type,
5955: cp_party_id jai_rgm_thresholds.party_id%type,
5956: cp_regime_id jai_rgm_thresholds.regime_id%type

Line 5953: cp_org_tan_no jai_rgm_thresholds.org_tan_no%type,

5949: and NVL(thslbs.from_amount,0) = 0;
5950:
5951:
5952: cursor get_jai_rgm_thresholds_count ( cp_fin_year jai_rgm_thresholds.fin_year%type,
5953: cp_org_tan_no jai_rgm_thresholds.org_tan_no%type,
5954: cp_party_type jai_rgm_thresholds.party_type%type,
5955: cp_party_id jai_rgm_thresholds.party_id%type,
5956: cp_regime_id jai_rgm_thresholds.regime_id%type
5957: )

Line 5954: cp_party_type jai_rgm_thresholds.party_type%type,

5950:
5951:
5952: cursor get_jai_rgm_thresholds_count ( cp_fin_year jai_rgm_thresholds.fin_year%type,
5953: cp_org_tan_no jai_rgm_thresholds.org_tan_no%type,
5954: cp_party_type jai_rgm_thresholds.party_type%type,
5955: cp_party_id jai_rgm_thresholds.party_id%type,
5956: cp_regime_id jai_rgm_thresholds.regime_id%type
5957: )
5958: IS

Line 5955: cp_party_id jai_rgm_thresholds.party_id%type,

5951:
5952: cursor get_jai_rgm_thresholds_count ( cp_fin_year jai_rgm_thresholds.fin_year%type,
5953: cp_org_tan_no jai_rgm_thresholds.org_tan_no%type,
5954: cp_party_type jai_rgm_thresholds.party_type%type,
5955: cp_party_id jai_rgm_thresholds.party_id%type,
5956: cp_regime_id jai_rgm_thresholds.regime_id%type
5957: )
5958: IS
5959: select count(*)

Line 5956: cp_regime_id jai_rgm_thresholds.regime_id%type

5952: cursor get_jai_rgm_thresholds_count ( cp_fin_year jai_rgm_thresholds.fin_year%type,
5953: cp_org_tan_no jai_rgm_thresholds.org_tan_no%type,
5954: cp_party_type jai_rgm_thresholds.party_type%type,
5955: cp_party_id jai_rgm_thresholds.party_id%type,
5956: cp_regime_id jai_rgm_thresholds.regime_id%type
5957: )
5958: IS
5959: select count(*)
5960: from jai_rgm_thresholds

Line 5960: from jai_rgm_thresholds

5956: cp_regime_id jai_rgm_thresholds.regime_id%type
5957: )
5958: IS
5959: select count(*)
5960: from jai_rgm_thresholds
5961: where fin_year = cp_fin_year
5962: and org_tan_no = cp_org_tan_no
5963: and party_type = cp_party_type
5964: and party_id = cp_party_id

Line 5968: ln_regime_id jai_rgm_thresholds.regime_id%type;

5964: and party_id = cp_party_id
5965: and regime_id = cp_regime_id;
5966:
5967: lx_row_id rowid;
5968: ln_regime_id jai_rgm_thresholds.regime_id%type;
5969: ln_org_tan_no jai_rgm_thresholds.org_tan_no%type;
5970: ln_party_id jai_rgm_thresholds.party_id%type;
5971: ln_party_type jai_rgm_thresholds.party_type%type;
5972: ln_fin_year jai_rgm_thresholds.fin_year%type;

Line 5969: ln_org_tan_no jai_rgm_thresholds.org_tan_no%type;

5965: and regime_id = cp_regime_id;
5966:
5967: lx_row_id rowid;
5968: ln_regime_id jai_rgm_thresholds.regime_id%type;
5969: ln_org_tan_no jai_rgm_thresholds.org_tan_no%type;
5970: ln_party_id jai_rgm_thresholds.party_id%type;
5971: ln_party_type jai_rgm_thresholds.party_type%type;
5972: ln_fin_year jai_rgm_thresholds.fin_year%type;
5973: ln_party_pan_no JAI_CMN_CUS_ADDRESSES.pan_no%type;

Line 5970: ln_party_id jai_rgm_thresholds.party_id%type;

5966:
5967: lx_row_id rowid;
5968: ln_regime_id jai_rgm_thresholds.regime_id%type;
5969: ln_org_tan_no jai_rgm_thresholds.org_tan_no%type;
5970: ln_party_id jai_rgm_thresholds.party_id%type;
5971: ln_party_type jai_rgm_thresholds.party_type%type;
5972: ln_fin_year jai_rgm_thresholds.fin_year%type;
5973: ln_party_pan_no JAI_CMN_CUS_ADDRESSES.pan_no%type;
5974: ln_customer_type_lkup_code JAI_CMN_CUS_ADDRESSES.tcs_customer_type%type;

Line 5971: ln_party_type jai_rgm_thresholds.party_type%type;

5967: lx_row_id rowid;
5968: ln_regime_id jai_rgm_thresholds.regime_id%type;
5969: ln_org_tan_no jai_rgm_thresholds.org_tan_no%type;
5970: ln_party_id jai_rgm_thresholds.party_id%type;
5971: ln_party_type jai_rgm_thresholds.party_type%type;
5972: ln_fin_year jai_rgm_thresholds.fin_year%type;
5973: ln_party_pan_no JAI_CMN_CUS_ADDRESSES.pan_no%type;
5974: ln_customer_type_lkup_code JAI_CMN_CUS_ADDRESSES.tcs_customer_type%type;
5975: ln_threshold_slab_id jai_ap_tds_thhold_slabs.threshold_slab_id%type default NULL;

Line 5972: ln_fin_year jai_rgm_thresholds.fin_year%type;

5968: ln_regime_id jai_rgm_thresholds.regime_id%type;
5969: ln_org_tan_no jai_rgm_thresholds.org_tan_no%type;
5970: ln_party_id jai_rgm_thresholds.party_id%type;
5971: ln_party_type jai_rgm_thresholds.party_type%type;
5972: ln_fin_year jai_rgm_thresholds.fin_year%type;
5973: ln_party_pan_no JAI_CMN_CUS_ADDRESSES.pan_no%type;
5974: ln_customer_type_lkup_code JAI_CMN_CUS_ADDRESSES.tcs_customer_type%type;
5975: ln_threshold_slab_id jai_ap_tds_thhold_slabs.threshold_slab_id%type default NULL;
5976: lr_hdr_record jai_rgm_thresholds%rowtype;

Line 5976: lr_hdr_record jai_rgm_thresholds%rowtype;

5972: ln_fin_year jai_rgm_thresholds.fin_year%type;
5973: ln_party_pan_no JAI_CMN_CUS_ADDRESSES.pan_no%type;
5974: ln_customer_type_lkup_code JAI_CMN_CUS_ADDRESSES.tcs_customer_type%type;
5975: ln_threshold_slab_id jai_ap_tds_thhold_slabs.threshold_slab_id%type default NULL;
5976: lr_hdr_record jai_rgm_thresholds%rowtype;
5977: ln_user_id fnd_user.user_id%type := fnd_global.user_id;
5978: ln_login_id fnd_logins.login_id%type := fnd_global.login_id;
5979: ln_count NUMBER;
5980: ln_threshold_id jai_rgm_thresholds.threshold_id%type default NULL;

Line 5980: ln_threshold_id jai_rgm_thresholds.threshold_id%type default NULL;

5976: lr_hdr_record jai_rgm_thresholds%rowtype;
5977: ln_user_id fnd_user.user_id%type := fnd_global.user_id;
5978: ln_login_id fnd_logins.login_id%type := fnd_global.login_id;
5979: ln_count NUMBER;
5980: ln_threshold_id jai_rgm_thresholds.threshold_id%type default NULL;
5981: BEGIN
5982: -- code ported from BL12.1.3 by zhiwei.xin on 15-MAR-2013 begin
5983: /*--Commented by Chong for DTC ER 2012/09/11 Get TCS calendar from regime start
5984: OPEN get_tcs_fin_year( cp_org_id => p_ooh.org_id ,

Line 6042: OPEN get_jai_rgm_thresholds_count ( cp_fin_year => ln_fin_year,

6038: CLOSE c_get_threshold_slab;
6039:
6040: ln_count :=0;
6041:
6042: OPEN get_jai_rgm_thresholds_count ( cp_fin_year => ln_fin_year,
6043: cp_org_tan_no => ln_org_tan_no,
6044: cp_party_type => jai_constants.party_type_customer,
6045: cp_party_id => p_ooh.sold_to_org_id ,
6046: cp_regime_id => ln_regime_id

Line 6048: FETCH get_jai_rgm_thresholds_count INTO ln_count;

6044: cp_party_type => jai_constants.party_type_customer,
6045: cp_party_id => p_ooh.sold_to_org_id ,
6046: cp_regime_id => ln_regime_id
6047: );
6048: FETCH get_jai_rgm_thresholds_count INTO ln_count;
6049: CLOSE get_jai_rgm_thresholds_count;
6050:
6051: lr_hdr_record.threshold_id := ln_threshold_id ;
6052: lr_hdr_record.regime_id := ln_regime_id;

Line 6049: CLOSE get_jai_rgm_thresholds_count;

6045: cp_party_id => p_ooh.sold_to_org_id ,
6046: cp_regime_id => ln_regime_id
6047: );
6048: FETCH get_jai_rgm_thresholds_count INTO ln_count;
6049: CLOSE get_jai_rgm_thresholds_count;
6050:
6051: lr_hdr_record.threshold_id := ln_threshold_id ;
6052: lr_hdr_record.regime_id := ln_regime_id;
6053: lr_hdr_record.org_tan_no := ln_org_tan_no ;

Line 6066: --Insert in jai_rgm_thresholds only if records does not exists.

6062: lr_hdr_record.last_update_date := sysdate ;
6063: lr_hdr_record.last_updated_by := ln_user_id ;
6064: lr_hdr_record.last_update_login := ln_login_id ;
6065: lr_hdr_record.party_pan_no :=ln_party_pan_no;
6066: --Insert in jai_rgm_thresholds only if records does not exists.
6067: IF NVL(ln_count,0) = 0 THEN
6068:
6069: jai_rgm_thhold_proc_pkg.insert_threshold_hdr ( p_record => lr_hdr_record
6070: , p_threshold_id => ln_threshold_id

Line 6666: pv_log_msg => 'Update to table JAI_CMN_CUS_ADDRESSES successful. Now updating the table jai_rgm_thresholds '

6662: AND pan_no = p_old_pan_no ;
6663:
6664: /*commented by csahoo for bug# 6401388
6665: jai_cmn_debug_contexts_pkg.print ( pn_reg_id => ln_reg_id ,
6666: pv_log_msg => 'Update to table JAI_CMN_CUS_ADDRESSES successful. Now updating the table jai_rgm_thresholds '
6667: );*/
6668:
6669:
6670: /*

Line 6674: jai_rgm_thresholds

6670: /*
6671: ||Update the JAI_CMN_CUS_ADDRESSES table . Set the Old pan number with the new pan number as specified in the input.
6672: */
6673: UPDATE
6674: jai_rgm_thresholds
6675: SET
6676: party_pan_no = p_new_pan_no
6677: WHERE
6678: party_id = p_party_id