[Home] [Help]
2847: SELECT NVL(opening_balance,0),NVL(closing_balance,0),
2848: NVL(basic_opening_balance,0) ,NVL(basic_closing_balance,0),
2849: NVL(additional_opening_balance,0) ,NVL(additional_closing_balance,0),
2850: NVL(other_opening_balance,0), NVL(other_closing_balance,0)
2851: FROM JAI_CMN_RG_PLA_TRXS
2852: WHERE organization_id = p_org_id AND
2853: location_id = p_location_id AND
2854: slno = p_previous_serial_no AND
2855: fin_year = p_fin_year;
2871: WHERE A.site_use_id = p_customer_site_id);
2872:
2873: CURSOR serial_no_cur IS
2874: SELECT NVL(MAX(slno),0) , NVL(MAX(slno),0) + 1
2875: FROM JAI_CMN_RG_PLA_TRXS
2876: WHERE organization_id = p_org_id AND
2877: location_id = p_location_id AND
2878: fin_year = p_fin_year;
2879:
2924: */
2925: CURSOR cur_get_pla_reg_id
2926: IS
2927: SELECT
2928: jai_cmn_rg_pla_trxs_s1.nextval
2929: FROM
2930: dual;
2931:
2932: ln_register_id JAI_CMN_RG_PLA_TRXS.REGISTER_ID%TYPE;
2928: jai_cmn_rg_pla_trxs_s1.nextval
2929: FROM
2930: dual;
2931:
2932: ln_register_id JAI_CMN_RG_PLA_TRXS.REGISTER_ID%TYPE;
2933:
2934: lv_object_name CONSTANT VARCHAR2 (61) := 'jai_om_rg_pkg.ja_in_pla_entry';
2935:
2936: BEGIN
3091: CLOSE cur_get_pla_reg_id ;
3092:
3093: IF v_register_code ='EXPORT_EXCISE' AND v_export_oriented_unit='Y' THEN
3094:
3095: fnd_file.put_line(fnd_file.log, '15 before insert into update into JAI_CMN_RG_PLA_TRXS , slno ' || v_serial_no
3096: ||' ,register_id ->' || ln_register_id
3097: ||' ,organization_id ->' || p_org_id
3098: ||' ,location_id ->' || p_location_id
3099: ||' ,inventory_item_id ->' || p_inventory_item_id
3130:
3131:
3132: /* Modified by Ramananda for removal of SQL LITERALs :bug#4428980*/
3133:
3134: INSERT INTO JAI_CMN_RG_PLA_TRXS(register_id,
3135: slno,
3136: organization_id,
3137: location_id,
3138: inventory_item_id,
3202: v_other_opening_balance,
3203: v_other_closing_balance
3204: ) returning register_id into ln_register_id;
3205:
3206: fnd_file.put_line(fnd_file.log, '16 after insert into JAI_CMN_RG_PLA_TRXS');
3207:
3208: v_excise_amount := NVL(p_dr_basic_ed,0) + NVL(p_dr_additional_ed,0) + NVL(p_dr_other_ed,0);
3209:
3210: UPDATE JAI_CMN_RG_BALANCES
3215: WHERE organization_id = p_org_id
3216: AND location_id = p_location_id;
3217: fnd_file.put_line(fnd_file.log, '17 after update into JAI_CMN_RG_BALANCES');
3218: ELSE
3219: fnd_file.put_line(fnd_file.log, '18 before insert into update into JAI_CMN_RG_PLA_TRXS , slno ' || v_serial_no
3220: ||' , register_id ->' || ln_register_id
3221: ||' , organization_id ->' || p_org_id
3222: ||' , location_id ->' || p_location_id
3223: ||' , inventory_item_id ->' || p_inventory_item_id
3246: ||' , last_updated_by ->' || p_last_updated_by
3247: );
3248:
3249: /* Modified by Ramananda for removal of SQL LITERALs :bug#4428980*/
3250: INSERT INTO JAI_CMN_RG_PLA_TRXS(
3251: register_id,
3252: slno,
3253: organization_id,
3254: location_id,
3307: p_last_update_date,
3308: p_last_updated_by
3309: ) returning register_id into ln_register_id;
3310:
3311: fnd_file.put_line(fnd_file.log, '19 after insert into JAI_CMN_RG_PLA_TRXS');
3312:
3313: v_excise_amount := NVL(p_dr_basic_ed,0) + NVL(p_dr_additional_ed,0) + NVL(p_dr_other_ed,0);
3314:
3315: UPDATE JAI_CMN_RG_BALANCES
3387: );
3388: Fnd_File.PUT_LINE(Fnd_File.LOG, 'after calling ja_in_cess_register_entries procedure');
3389:
3390:
3391: update JAI_CMN_RG_PLA_TRXS
3392: set other_tax_debit = ln_cess_amount + ln_sh_cess_amount -- Date 04/06/2007 by Sacsethi for bug 6109941
3393: where register_id = ln_register_id;
3394:
3395: EXCEPTION