Commit 13aa34ca authored by cpatil's avatar cpatil

*** empty log message ***


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@92306 ce508802-f39f-4f6c-b175-0d175dae99d5
parent fdc0176b
......@@ -534,11 +534,11 @@ public class StockUpdate
mamount = this.quantity * this.rate;
count=0;
// *********xxxxxxxxxxxxxxxx********************
sql = "select count(*) 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+"'";
sql = "select count(*) from stock where item_code ='"+this.itemCode.trim()+"'"
+" and site_code ='"+this.siteCode.trim()+"'"
+" and loc_code = '"+this.locationCode.trim()+"'"
+" and lot_no = '"+this.lotNo.trim()+"'"
+" and lot_sl = '"+this.lotSl.trim()+"'";
System.out.println("Query :::- ["+sql+"]");
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
......@@ -546,6 +546,7 @@ public class StockUpdate
{
count=rs.getInt(1);
}
System.out.println("@@@@test :count::::["+count+"]");
pstmt.close();
rs.close();
if(count != 0)
......@@ -930,6 +931,10 @@ public class StockUpdate
{
errString = updateLotInfo( updateStockMap , conn); // added by cpatil calling function
if( errString != null && errString.trim().length() > 0)
{
return errString;
}
if (count > 0)
{
sql ="select (case when acct_code__inv is null then ' ' else acct_code__inv end), (case when cctr_code__inv is null then ' ' else cctr_code__inv end), qty_per_art"
......@@ -1142,6 +1147,25 @@ public class StockUpdate
}
}
//
sql="select count(1) from stock where item_code= ? ,site_code = ? ,loc_code= ? ,lot_no = ? ,lot_sl = ? ";
System.out.println("Query :::- ["+sql+"]");
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,this.itemCode);
pstmt.setString(2,this.siteCode);
pstmt.setString(3,this.locationCode);
pstmt.setString(4,this.lotNo);
pstmt.setString(5,this.lotSl);
rs = pstmt.executeQuery();
if(rs.next())
{
int cnt5 = rs.getInt(1);
System.out.println("tets ::cnt 5 ::::"+cnt5);
}
pstmt.close();
rs.close();
//
sql="insert into stock "
+" (item_code , site_code, loc_code,"
+" lot_no, lot_sl, unit,"
......@@ -1240,6 +1264,7 @@ public class StockUpdate
System.out.println("CREA_DATE :"+creaDt);
pstmt.executeUpdate();
System.out.println("@@@@@@@ executed sucessfully............");
}
}
if(this.tranType.equalsIgnoreCase("I") || this.tranType.equalsIgnoreCase("ID"))
......@@ -2916,6 +2941,7 @@ public class StockUpdate
cnt1 = pstmt.executeUpdate();
pstmt.close();
pstmt = null;
System.out.println("@@@@ cnt1:::"+cnt1);
if ( cnt1 == 0)
{
errCode = "VTUPDDET";
......
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