Commit 64e8b564 authored by prane's avatar prane

removed single quotes while updating rate in stock update

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@204244 ce508802-f39f-4f6c-b175-0d175dae99d5
parent badd1728
...@@ -2030,8 +2030,8 @@ public class StockUpdate ...@@ -2030,8 +2030,8 @@ public class StockUpdate
if(this.tranType.equalsIgnoreCase("R")){ if(this.tranType.equalsIgnoreCase("R")){
if (stkOpt.equalsIgnoreCase("1") || stockValuation.equalsIgnoreCase("M")) if (stkOpt.equalsIgnoreCase("1") || stockValuation.equalsIgnoreCase("M"))
{ {
sql =" update stock set rate = (case when '"+this.rate+"' is null then 0 else "+this.rate+" end)," sql =" update stock set rate = (case when "+this.rate+" is null then 0 else "+this.rate+" end),"
+" gross_rate = (case when '"+this.grossRate+"' is null then 0 else "+this.grossRate+" end)" +" gross_rate = (case when "+this.grossRate+" is null then 0 else "+this.grossRate+" end)"
+" where item_code ='"+this.itemCode+"'" +" where item_code ='"+this.itemCode+"'"
+" and site_code ='"+this.siteCode+"'" +" and site_code ='"+this.siteCode+"'"
+" and grade = '"+this.grade+"'"; +" and grade = '"+this.grade+"'";
...@@ -2047,8 +2047,8 @@ public class StockUpdate ...@@ -2047,8 +2047,8 @@ public class StockUpdate
} }
else if (stockValuation.equalsIgnoreCase("C")) else if (stockValuation.equalsIgnoreCase("C"))
{ {
sql = " update stock set rate = (case when '"+this.rate+"' is null then 0 else '"+this.rate+"' end) ," sql = " update stock set rate = (case when "+this.rate+" is null then 0 else "+this.rate+" end) ,"
+" gross_rate = (case when '"+this.grossRate+"' is null then 0 else '"+this.grossRate+"' end) " +" gross_rate = (case when "+this.grossRate+" is null then 0 else "+this.grossRate+" end) "
+" where item_code ='"+this.itemCode+"'" +" where item_code ='"+this.itemCode+"'"
+" and site_code ='"+this.siteCode+"'" +" and site_code ='"+this.siteCode+"'"
+" and grade = '"+this.grade+"'" +" and grade = '"+this.grade+"'"
...@@ -2064,8 +2064,8 @@ public class StockUpdate ...@@ -2064,8 +2064,8 @@ public class StockUpdate
//Changed by wasim on 16-03-2015 to close Prepared Statement/Result Set [END] //Changed by wasim on 16-03-2015 to close Prepared Statement/Result Set [END]
}else if (stkOpt.equalsIgnoreCase("2")) }else if (stkOpt.equalsIgnoreCase("2"))
{ {
sql = " update stock set rate = (case when '"+this.rate+"' is null then 0 else '"+this.rate+"' end) ," sql = " update stock set rate = (case when "+this.rate+" is null then 0 else "+this.rate+" end) ,"
+" gross_rate = (case when '"+this.grossRate+"' is null then 0 else '"+this.grossRate+"' end) " +" gross_rate = (case when "+this.grossRate+" is null then 0 else "+this.grossRate+" end) "
+" where item_code ='"+this.itemCode+"'" +" where item_code ='"+this.itemCode+"'"
+" and site_code ='"+this.siteCode+"'" +" and site_code ='"+this.siteCode+"'"
+" and grade = '"+this.grade+"'" +" and grade = '"+this.grade+"'"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment