[Home] [Help]
240: AND a.organization_id = cp_organization_id
241: AND (cp_location_id is null or a.location_id=cp_location_id);
242:
243: CURSOR c_rcv_rgm_dtl(cp_regime_code VARCHAR2, cp_shipment_line_id NUMBER) IS
244: SELECT nvl(process_status_flag, jai_constants.no) process_status_flag,
245: regime_item_class,
246: invoice_no
247: FROM jai_rcv_rgm_lines
248: WHERE shipment_line_id = cp_shipment_line_id
1312:
1313: Fix
1314: ---
1315: 1) Commented the Condition -
1316: "IF lv_vat_recoverable_for_item = jai_constants.yes
1317: AND NVL(ln_chk_vat, 0) <> 0
1318: AND r_rcv_rgm_dtl.process_status_flag <> 'U' --Not Unclaimed
1319: AND r_rcv_rgm_dtl.invoice_no IS NULL"
1320:
1551:
1552: --File.Sql.35 Cbabu
1553: -- v_form_id := 'JAINPORE';
1554: v_tax_total := 0;
1555: v_duplicate_ship := jai_constants.no;
1556: v_chk_receipt_lines :=0;
1557: v_chk_receipt_tax_lines :=0;
1558: v_precedence_0 :=0;
1559: v_precedence_non_0 :=0;
1557: v_chk_receipt_tax_lines :=0;
1558: v_precedence_0 :=0;
1559: v_precedence_non_0 :=0;
1560: v_tax_base :=0;
1561: v_debug_flag := jai_constants.no;
1562: v_price_override :=0;
1563: v_po_quantity :=0;
1564: v_assessable_value :=0;
1565: ln_vat_assess_value :=0;
1932: --Pick Item Modvat Flag---------------------------------------------------------------------
1933:
1934: /* Start, following call added by Vijay Shankar for Bug#4250236(4245089). VAT Impl. */
1935: jai_inv_items_pkg.jai_get_attrib(
1936: p_regime_code => jai_constants.vat_regime,
1937: p_organization_id => p_organization_id,
1938: p_inventory_item_id => v_item_id,
1939: p_attribute_code => jai_constants.rgm_attr_item_recoverable,
1940: p_attribute_value => lv_vat_recoverable_for_item,
1935: jai_inv_items_pkg.jai_get_attrib(
1936: p_regime_code => jai_constants.vat_regime,
1937: p_organization_id => p_organization_id,
1938: p_inventory_item_id => v_item_id,
1939: p_attribute_code => jai_constants.rgm_attr_item_recoverable,
1940: p_attribute_value => lv_vat_recoverable_for_item,
1941: p_process_flag => lv_process_flag,
1942: p_process_msg => lv_process_msg
1943: );
1941: p_process_flag => lv_process_flag,
1942: p_process_msg => lv_process_msg
1943: );
1944:
1945: IF lv_process_flag = jai_constants.unexpected_error THEN
1946: errormsg:='Error from jai_inv_items_pkg.jai_get_attrib: Error:'||lv_process_msg;
1947: RAISE_APPLICATION_ERROR( -20099, 'Error from jai_inv_items_pkg.jai_get_attrib: Error:'||lv_process_msg);
1948: END IF;
1949:
1947: RAISE_APPLICATION_ERROR( -20099, 'Error from jai_inv_items_pkg.jai_get_attrib: Error:'||lv_process_msg);
1948: END IF;
1949:
1950: -- Default value for following variable is set as YES
1951: lv_vat_recoverable_for_item := nvl(lv_vat_recoverable_for_item, jai_constants.yes); -- CHK
1952: /* End, Vijay Shankar for Bug#4250236(4245089) */
1953: jai_cmn_utils_pkg.write_fnd_log_msg('jai_rcv_trx_prc.process_begin',' v_rcv_uom_code '||v_rcv_uom_code||' v_po_uom_code '||v_po_uom_code ||' v_item_id '||v_item_id);
1954: IF v_rcv_uom_code <> v_po_uom_code THEN
1955:
2111:
2112: IF v_item_modvat_flag = 'N' AND
2113: v_item_trading_flag = 'N' AND
2114: upper(lines_rec.tax_type) IN ('EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE', 'CVD',
2115: JAI_CONSTANTS.TAX_TYPE_SH_EXC_EDU_CESS,jai_constants.tax_type_exc_edu_cess,
2116: JAI_CONSTANTS.TAX_TYPE_SH_CVD_EDU_CESS,jai_constants.tax_type_cvd_edu_cess)/*Bug 5989740 bduvarag*/
2117: THEN
2118: v_tax_modvat_flag := 'N';
2119:
2112: IF v_item_modvat_flag = 'N' AND
2113: v_item_trading_flag = 'N' AND
2114: upper(lines_rec.tax_type) IN ('EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE', 'CVD',
2115: JAI_CONSTANTS.TAX_TYPE_SH_EXC_EDU_CESS,jai_constants.tax_type_exc_edu_cess,
2116: JAI_CONSTANTS.TAX_TYPE_SH_CVD_EDU_CESS,jai_constants.tax_type_cvd_edu_cess)/*Bug 5989740 bduvarag*/
2117: THEN
2118: v_tax_modvat_flag := 'N';
2119:
2120: /* following elsif added by Vijay Shankar for Bug#4250236(4245089). VAT Impl. */
2117: THEN
2118: v_tax_modvat_flag := 'N';
2119:
2120: /* following elsif added by Vijay Shankar for Bug#4250236(4245089). VAT Impl. */
2121: ELSIF lv_vat_recoverable_for_item <> jai_constants.yes
2122: AND lines_rec.regime_code = jai_constants.vat_regime
2123: THEN
2124: v_tax_modvat_flag := jai_constants.yes; --Changed the constant to yes so that VAT taxes can be recovered in case of recoverable flag is No. For bug#8302581
2125:
2118: v_tax_modvat_flag := 'N';
2119:
2120: /* following elsif added by Vijay Shankar for Bug#4250236(4245089). VAT Impl. */
2121: ELSIF lv_vat_recoverable_for_item <> jai_constants.yes
2122: AND lines_rec.regime_code = jai_constants.vat_regime
2123: THEN
2124: v_tax_modvat_flag := jai_constants.yes; --Changed the constant to yes so that VAT taxes can be recovered in case of recoverable flag is No. For bug#8302581
2125:
2126: ELSIF lines_rec.modcp > 0 THEN
2120: /* following elsif added by Vijay Shankar for Bug#4250236(4245089). VAT Impl. */
2121: ELSIF lv_vat_recoverable_for_item <> jai_constants.yes
2122: AND lines_rec.regime_code = jai_constants.vat_regime
2123: THEN
2124: v_tax_modvat_flag := jai_constants.yes; --Changed the constant to yes so that VAT taxes can be recovered in case of recoverable flag is No. For bug#8302581
2125:
2126: ELSIF lines_rec.modcp > 0 THEN
2127: v_tax_modvat_flag := 'Y';
2128: END IF;
2148: /* Added by LGOPALSA. Bug 4210102
2149: * Added CVD, Excise and Customs edcuation cess */
2150:
2151: IF upper(lines_rec.tax_type) IN ('EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE', 'CUSTOMS', 'CVD',
2152: JAI_CONSTANTS.TAX_TYPE_SH_EXC_EDU_CESS,jai_constants.tax_type_Exc_edu_cess,
2153: JAI_CONSTANTS.TAX_TYPE_SH_CVD_EDU_CESS,jai_constants.tax_type_cvd_Edu_cess,
2154: JAI_CONSTANTS.TAX_TYPE_SH_CUSTOMS_EDU_CESS,jai_constants.tax_type_customs_edu_cess)/*Bug5989740 bduvarag*/
2155: THEN
2156: v_claimable_amount := NVL(v_cor_amount * v_conv_factor, 0) * NVL(lines_rec.duty, 0) / 100;
2149: * Added CVD, Excise and Customs edcuation cess */
2150:
2151: IF upper(lines_rec.tax_type) IN ('EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE', 'CUSTOMS', 'CVD',
2152: JAI_CONSTANTS.TAX_TYPE_SH_EXC_EDU_CESS,jai_constants.tax_type_Exc_edu_cess,
2153: JAI_CONSTANTS.TAX_TYPE_SH_CVD_EDU_CESS,jai_constants.tax_type_cvd_Edu_cess,
2154: JAI_CONSTANTS.TAX_TYPE_SH_CUSTOMS_EDU_CESS,jai_constants.tax_type_customs_edu_cess)/*Bug5989740 bduvarag*/
2155: THEN
2156: v_claimable_amount := NVL(v_cor_amount * v_conv_factor, 0) * NVL(lines_rec.duty, 0) / 100;
2157: ELSE
2150:
2151: IF upper(lines_rec.tax_type) IN ('EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE', 'CUSTOMS', 'CVD',
2152: JAI_CONSTANTS.TAX_TYPE_SH_EXC_EDU_CESS,jai_constants.tax_type_Exc_edu_cess,
2153: JAI_CONSTANTS.TAX_TYPE_SH_CVD_EDU_CESS,jai_constants.tax_type_cvd_Edu_cess,
2154: JAI_CONSTANTS.TAX_TYPE_SH_CUSTOMS_EDU_CESS,jai_constants.tax_type_customs_edu_cess)/*Bug5989740 bduvarag*/
2155: THEN
2156: v_claimable_amount := NVL(v_cor_amount * v_conv_factor, 0) * NVL(lines_rec.duty, 0) / 100;
2157: ELSE
2158: v_claimable_amount := 0;
2637:
2638: /*commented the code and added whatever is required inside the loop
2639:
2640: If p_source_document_code = 'INVENTORY'/*rchandan - 6030615..start*
2641: and po_lines_rec.regime_code <> jai_constants.vat_regime
2642: and upper(po_lines_rec.tax_type) NOT IN ('EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE')
2643: THEN
2644: v_price_override := r_jai_mtl_Trxs.selling_price;
2645: END IF;
2643: THEN
2644: v_price_override := r_jai_mtl_Trxs.selling_price;
2645: END IF;
2646: -- bug 6488829 uncommented the if condition *
2647: IF p_source_document_code = 'INVENTORY' AND po_lines_rec.regime_code = jai_constants.vat_regime THEN
2648: v_precedence_0 := v_price_override;
2649: ELSE
2650: ln_vat_assess_value:=ln_vat_assess_value*v_po_quantity;
2651: v_assessable_value:=v_assessable_value*v_po_quantity;
2785: end_date_tab(row_count) := 0;
2786: END IF;
2787:
2788: IF upper(po_lines_rec.tax_type) IN('EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE', 'CVD',
2789: JAI_CONSTANTS.TAX_TYPE_SH_EXC_EDU_CESS,jai_constants.tax_type_exc_edu_cess,
2790: JAI_CONSTANTS.TAX_TYPE_SH_CVD_EDU_CESS,jai_constants.tax_type_cvd_edu_cess)
2791: THEN
2792: tax_type_tab(row_count) := 1;
2793: ELSIF po_lines_rec.regime_code=jai_constants.vat_regime
2786: END IF;
2787:
2788: IF upper(po_lines_rec.tax_type) IN('EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE', 'CVD',
2789: JAI_CONSTANTS.TAX_TYPE_SH_EXC_EDU_CESS,jai_constants.tax_type_exc_edu_cess,
2790: JAI_CONSTANTS.TAX_TYPE_SH_CVD_EDU_CESS,jai_constants.tax_type_cvd_edu_cess)
2791: THEN
2792: tax_type_tab(row_count) := 1;
2793: ELSIF po_lines_rec.regime_code=jai_constants.vat_regime
2794: THEN
2789: JAI_CONSTANTS.TAX_TYPE_SH_EXC_EDU_CESS,jai_constants.tax_type_exc_edu_cess,
2790: JAI_CONSTANTS.TAX_TYPE_SH_CVD_EDU_CESS,jai_constants.tax_type_cvd_edu_cess)
2791: THEN
2792: tax_type_tab(row_count) := 1;
2793: ELSIF po_lines_rec.regime_code=jai_constants.vat_regime
2794: THEN
2795: tax_type_tab(row_count) := 4;
2796: --Add by Xiao for GST refer to bug#10043656 on 14-Sep-2010, begin
2797: ------------------------------------------------------------------
2794: THEN
2795: tax_type_tab(row_count) := 4;
2796: --Add by Xiao for GST refer to bug#10043656 on 14-Sep-2010, begin
2797: ------------------------------------------------------------------
2798: /* ELSIF upper(po_lines_rec.regime_code) IN (jai_constants.cgst_regime, jai_constants.sgst_regime)
2799: THEN
2800: tax_type_tab(row_count) := 7; */
2801: -----------------------------------------------------------------
2802: --Add by Xiao for GST refer to bug#10043656 on 14-Sep-2010, end
2807:
2808: IF v_item_modvat_flag = 'N' AND
2809: v_item_trading_flag = 'N' AND
2810: upper(po_lines_rec.tax_type) IN ('EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE', 'CVD',
2811: JAI_CONSTANTS.TAX_TYPE_SH_EXC_EDU_CESS,jai_constants.tax_type_exc_edu_cess,
2812: JAI_CONSTANTS.TAX_TYPE_SH_CVD_EDU_CESS,jai_constants.tax_type_cvd_edu_cess)/*bug5989740 bduvarag*/
2813: THEN
2814: v_tax_modvat_flag := 'N';
2815: /* following elsif added by Vijay Shankar for Bug#4250236(4245089). VAT Impl. */
2808: IF v_item_modvat_flag = 'N' AND
2809: v_item_trading_flag = 'N' AND
2810: upper(po_lines_rec.tax_type) IN ('EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE', 'CVD',
2811: JAI_CONSTANTS.TAX_TYPE_SH_EXC_EDU_CESS,jai_constants.tax_type_exc_edu_cess,
2812: JAI_CONSTANTS.TAX_TYPE_SH_CVD_EDU_CESS,jai_constants.tax_type_cvd_edu_cess)/*bug5989740 bduvarag*/
2813: THEN
2814: v_tax_modvat_flag := 'N';
2815: /* following elsif added by Vijay Shankar for Bug#4250236(4245089). VAT Impl. */
2816: /*Commented for Bug 4644524 bduvarag*/
2813: THEN
2814: v_tax_modvat_flag := 'N';
2815: /* following elsif added by Vijay Shankar for Bug#4250236(4245089). VAT Impl. */
2816: /*Commented for Bug 4644524 bduvarag*/
2817: -- ELSIF lv_vat_recoverable_for_item <> jai_constants.yes
2818: ELSIF (lv_vat_recoverable_for_item <> jai_constants.yes OR r_rcv_shipment_lines.item_id IS NULL)
2819: AND po_lines_rec.regime_code = jai_constants.vat_regime
2820: THEN
2821: v_tax_modvat_flag := jai_constants.no;
2814: v_tax_modvat_flag := 'N';
2815: /* following elsif added by Vijay Shankar for Bug#4250236(4245089). VAT Impl. */
2816: /*Commented for Bug 4644524 bduvarag*/
2817: -- ELSIF lv_vat_recoverable_for_item <> jai_constants.yes
2818: ELSIF (lv_vat_recoverable_for_item <> jai_constants.yes OR r_rcv_shipment_lines.item_id IS NULL)
2819: AND po_lines_rec.regime_code = jai_constants.vat_regime
2820: THEN
2821: v_tax_modvat_flag := jai_constants.no;
2822:
2815: /* following elsif added by Vijay Shankar for Bug#4250236(4245089). VAT Impl. */
2816: /*Commented for Bug 4644524 bduvarag*/
2817: -- ELSIF lv_vat_recoverable_for_item <> jai_constants.yes
2818: ELSIF (lv_vat_recoverable_for_item <> jai_constants.yes OR r_rcv_shipment_lines.item_id IS NULL)
2819: AND po_lines_rec.regime_code = jai_constants.vat_regime
2820: THEN
2821: v_tax_modvat_flag := jai_constants.no;
2822:
2823: ELSE
2817: -- ELSIF lv_vat_recoverable_for_item <> jai_constants.yes
2818: ELSIF (lv_vat_recoverable_for_item <> jai_constants.yes OR r_rcv_shipment_lines.item_id IS NULL)
2819: AND po_lines_rec.regime_code = jai_constants.vat_regime
2820: THEN
2821: v_tax_modvat_flag := jai_constants.no;
2822:
2823: ELSE
2824: v_tax_modvat_flag := po_lines_rec.modvat_flag;
2825: END IF;
4006:
4007: /* Added by LGOPLASA. Bug 4210102.
4008: * Added CVD, Excise and customs education cess */
4009: IF upper(po_lines_rec.tax_type) IN ('EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE', 'CUSTOMS', 'CVD',
4010: JAI_CONSTANTS.TAX_TYPE_SH_EXC_EDU_CESS,jai_constants.tax_type_exc_edu_cess,
4011: JAI_CONSTANTS.TAX_TYPE_SH_CVD_EDU_CESS,jai_constants.tax_type_cvd_edu_cess,
4012: JAI_CONSTANTS.TAX_TYPE_SH_CUSTOMS_EDU_CESS,jai_constants.tax_type_customs_edu_cess)/*Bug5904736 bduvarag*/ THEN
4013: -- v_claimable_amount := NVL(v_cor_amount * v_conv_factor, 0) * NVL(lines_rec.duty, 0) / 100;
4014: -- above line commented by Aparajita for bug#2929171
4007: /* Added by LGOPLASA. Bug 4210102.
4008: * Added CVD, Excise and customs education cess */
4009: IF upper(po_lines_rec.tax_type) IN ('EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE', 'CUSTOMS', 'CVD',
4010: JAI_CONSTANTS.TAX_TYPE_SH_EXC_EDU_CESS,jai_constants.tax_type_exc_edu_cess,
4011: JAI_CONSTANTS.TAX_TYPE_SH_CVD_EDU_CESS,jai_constants.tax_type_cvd_edu_cess,
4012: JAI_CONSTANTS.TAX_TYPE_SH_CUSTOMS_EDU_CESS,jai_constants.tax_type_customs_edu_cess)/*Bug5904736 bduvarag*/ THEN
4013: -- v_claimable_amount := NVL(v_cor_amount * v_conv_factor, 0) * NVL(lines_rec.duty, 0) / 100;
4014: -- above line commented by Aparajita for bug#2929171
4015: v_claimable_amount := NVL(v_cor_amount, 0) * NVL(po_lines_rec.duty, 0) / 100;
4008: * Added CVD, Excise and customs education cess */
4009: IF upper(po_lines_rec.tax_type) IN ('EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE', 'CUSTOMS', 'CVD',
4010: JAI_CONSTANTS.TAX_TYPE_SH_EXC_EDU_CESS,jai_constants.tax_type_exc_edu_cess,
4011: JAI_CONSTANTS.TAX_TYPE_SH_CVD_EDU_CESS,jai_constants.tax_type_cvd_edu_cess,
4012: JAI_CONSTANTS.TAX_TYPE_SH_CUSTOMS_EDU_CESS,jai_constants.tax_type_customs_edu_cess)/*Bug5904736 bduvarag*/ THEN
4013: -- v_claimable_amount := NVL(v_cor_amount * v_conv_factor, 0) * NVL(lines_rec.duty, 0) / 100;
4014: -- above line commented by Aparajita for bug#2929171
4015: v_claimable_amount := NVL(v_cor_amount, 0) * NVL(po_lines_rec.duty, 0) / 100;
4016: ELSE
4299:
4300: -- Start of addition by Srihari on 30-NOV-99
4301: --added v_item_trading_flag for bug#12800001
4302: IF v_item_modvat_flag = 'N' AND v_item_trading_flag = 'N' and upper(tax_rec.tax_type) IN ('EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE',
4303: 'CVD', JAI_CONSTANTS.TAX_TYPE_SH_EXC_EDU_CESS,jai_constants.tax_type_exc_edu_cess, JAI_CONSTANTS.TAX_TYPE_SH_CVD_EDU_CESS,jai_constants.tax_type_cvd_edu_cess)/*Bug5989740 bduvarag*/
4304: THEN
4305: v_tax_modvat_flag := 'N';
4306: -- End of addition by Srihari on 30-NOV-99
4307:
4305: v_tax_modvat_flag := 'N';
4306: -- End of addition by Srihari on 30-NOV-99
4307:
4308: /* following elsif added by Vijay Shankar for Bug#4250236(4245089). VAT Impl. */
4309: ELSIF lv_vat_recoverable_for_item <> jai_constants.yes
4310: AND tax_rec.regime_code = jai_constants.vat_regime
4311: THEN
4312: v_tax_modvat_flag := jai_constants.no;
4313:
4306: -- End of addition by Srihari on 30-NOV-99
4307:
4308: /* following elsif added by Vijay Shankar for Bug#4250236(4245089). VAT Impl. */
4309: ELSIF lv_vat_recoverable_for_item <> jai_constants.yes
4310: AND tax_rec.regime_code = jai_constants.vat_regime
4311: THEN
4312: v_tax_modvat_flag := jai_constants.no;
4313:
4314: ELSIF tax_rec.mod_cr_percentage > 0 THEN
4308: /* following elsif added by Vijay Shankar for Bug#4250236(4245089). VAT Impl. */
4309: ELSIF lv_vat_recoverable_for_item <> jai_constants.yes
4310: AND tax_rec.regime_code = jai_constants.vat_regime
4311: THEN
4312: v_tax_modvat_flag := jai_constants.no;
4313:
4314: ELSIF tax_rec.mod_cr_percentage > 0 THEN
4315: v_tax_modvat_flag := 'Y';
4316: ELSE
4326: /* Added by LGOPALSa. Bug 4210102.
4327: * ADded Excise, Customs and CVD education cess */
4328:
4329: IF upper(tax_rec.tax_type) IN ('EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE', 'CUSTOMS', 'CVD',
4330: JAI_CONSTANTS.TAX_TYPE_SH_EXC_EDU_CESS,jai_constants.tax_type_exc_edu_cess,
4331: JAI_CONSTANTS.TAX_TYPE_SH_CVD_EDU_CESS,jai_constants.tax_type_cvd_edu_cess,
4332: JAI_CONSTANTS.TAX_TYPE_SH_CUSTOMS_EDU_CESS,jai_constants.tax_type_customs_edu_cess/*Bug5989740 bduvarag*/
4333: )
4334: THEN
4327: * ADded Excise, Customs and CVD education cess */
4328:
4329: IF upper(tax_rec.tax_type) IN ('EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE', 'CUSTOMS', 'CVD',
4330: JAI_CONSTANTS.TAX_TYPE_SH_EXC_EDU_CESS,jai_constants.tax_type_exc_edu_cess,
4331: JAI_CONSTANTS.TAX_TYPE_SH_CVD_EDU_CESS,jai_constants.tax_type_cvd_edu_cess,
4332: JAI_CONSTANTS.TAX_TYPE_SH_CUSTOMS_EDU_CESS,jai_constants.tax_type_customs_edu_cess/*Bug5989740 bduvarag*/
4333: )
4334: THEN
4335: v_claimable_amount := NVL(v_cor_amount * v_conv_factor, 0) * NVL(tax_rec.duty, 0) / 100;
4328:
4329: IF upper(tax_rec.tax_type) IN ('EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE', 'CUSTOMS', 'CVD',
4330: JAI_CONSTANTS.TAX_TYPE_SH_EXC_EDU_CESS,jai_constants.tax_type_exc_edu_cess,
4331: JAI_CONSTANTS.TAX_TYPE_SH_CVD_EDU_CESS,jai_constants.tax_type_cvd_edu_cess,
4332: JAI_CONSTANTS.TAX_TYPE_SH_CUSTOMS_EDU_CESS,jai_constants.tax_type_customs_edu_cess/*Bug5989740 bduvarag*/
4333: )
4334: THEN
4335: v_claimable_amount := NVL(v_cor_amount * v_conv_factor, 0) * NVL(tax_rec.duty, 0) / 100;
4336: ELSE
4485: AND jrtl.tax_id = jtc.tax_id)
4486: LOOP
4487:
4488: if upper(exc_rec.tax_type) IN ('EXCISE', 'CVD', 'ADDL. EXCISE', 'OTHER EXCISE',
4489: JAI_CONSTANTS.TAX_TYPE_SH_EXC_EDU_CESS,jai_constants.tax_type_exc_edu_cess, JAI_CONSTANTS.TAX_TYPE_SH_CVD_EDU_CESS,jai_constants.tax_type_cvd_edu_cess)/*Bug5989740 bduvarag*/
4490: then
4491: v_chk_excise := NVL(v_chk_excise, 0) + (exc_rec.tax_amount * exc_rec.mod_cr_percentage / 100);
4492:
4493: /* following added by Vijay Shankar for Bug#4250236(4245089). VAT Impl. */
4490: then
4491: v_chk_excise := NVL(v_chk_excise, 0) + (exc_rec.tax_amount * exc_rec.mod_cr_percentage / 100);
4492:
4493: /* following added by Vijay Shankar for Bug#4250236(4245089). VAT Impl. */
4494: elsif exc_rec.regime_code = jai_constants.vat_regime then
4495: ln_chk_vat := nvl(ln_chk_vat, 0) + (exc_rec.tax_amount * exc_rec.mod_cr_percentage / 100);
4496: end if;
4497:
4498: END LOOP;
4503: IF v_rg_location_id = 0 THEN
4504: v_rg_location_id := null;
4505: END IF;
4506:
4507: open c_rgm_setup_for_orgn_loc(jai_constants.vat_regime, jai_constants.orgn_type_io,
4508: p_organization_id, v_rg_location_id);
4509: fetch c_rgm_setup_for_orgn_loc into ln_vat_setup_chk;
4510: close c_rgm_setup_for_orgn_loc;
4511:
4544: v_manufacturing := i.manufacturing;
4545: EXIT WHEN v_manufacturing IS NOT NULL;
4546: END LOOP;
4547:
4548: open c_rcv_rgm_dtl(jai_constants.vat_regime, p_shipment_line_id);
4549: fetch c_rcv_rgm_dtl into r_rcv_rgm_dtl;
4550: close c_rcv_rgm_dtl;
4551:
4552: /* Bug 4516678. Added by Lakshmi Gopalsami */
4602: );
4603:
4604: -- following added by Vijay Shankar for Bug#4250236(4245089). VAT Impl.
4605: -- Before VAT is fully Claimed if RTV is being done, then we should error out the transaction
4606: /* IF lv_vat_recoverable_for_item = jai_constants.yes
4607: AND NVL(ln_chk_vat, 0) <> 0
4608: AND r_rcv_rgm_dtl.process_status_flag <> 'U' -- Not Unclaimed
4609: AND r_rcv_rgm_dtl.invoice_no IS NULL -- if this is given it means then VAT is eligible for claim
4610: THEN