Commit 65d12c10 authored by msharma's avatar msharma

no_art is updated correctly


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@95301 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 42cb34c8
......@@ -979,6 +979,42 @@ public class StockUpdate
pstmt.executeUpdate();
pstmt.close();
rs.close();
//Added by Manoj dtd 25/06/2014 to update no_art as 1 if no_art<=0
double countnoArt=0;
sql="select count(1) from stock " +
" where item_code = '"+this.itemCode+"'"
+"and site_code = '"+this.siteCode +"'"
+"and loc_code = '"+this.locationCode +"'"
+"and lot_no = '"+this.lotNo+"'"
+"and lot_sl = '"+this.lotSl+"' and no_art<=0";
System.out.println("sql---"+sql);
pstmt=conn.prepareStatement(sql);
rs=pstmt.executeQuery();
if(rs.next())
{
countnoArt=rs.getDouble(1);
}
rs.close();
rs=null;
pstmt.close();
pstmt=null;
System.out.println("countnoArt["+countnoArt+"]");
if(countnoArt>0)
{
sql="update stock set no_art=1 " +
" where item_code = '"+this.itemCode+"'"
+"and site_code = '"+this.siteCode +"'"
+"and loc_code = '"+this.locationCode +"'"
+"and lot_no = '"+this.lotNo+"'"
+"and lot_sl = '"+this.lotSl+"' and no_art=0";
System.out.println("sql---"+sql);
pstmt=conn.prepareStatement(sql);
pstmt.executeUpdate();
pstmt.close();
pstmt=null;
}
}
}
else if(this.tranType.equalsIgnoreCase("R"))
......
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