Commit ac488031 authored by caluka's avatar caluka

complete stock transfer through QC transfer then NO of art set to zero


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@97228 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 76b2e9d9
......@@ -868,6 +868,7 @@ public class StockUpdate
mstkQty = (mstkQty - meffQty);
if (count > 0)
{
System.out.println("tanser>>>>"+this.tranSer);
if(this.tranSer.equalsIgnoreCase("QC-ORD"))
{
sql=" update stock set quantity = quantity - ? ,"
......@@ -904,6 +905,7 @@ public class StockUpdate
pstmt.executeUpdate();
pstmt.close();
rs.close();
}else{
sql=" update stock set quantity = quantity - ? ,"
+" ltran_date = ? ,"
......@@ -936,6 +938,58 @@ public class StockUpdate
pstmt.executeUpdate();
pstmt.close();
rs.close();
//Added by chandrashekar dtd 05/02/2015 to update no_art as 1 if no_art<0
double stkQty=0,noArticle=0;
sql="select quantity,no_art 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+"' ";
System.out.println("from sql--- "+sql);
pstmt=conn.prepareStatement(sql);
rs=pstmt.executeQuery();
if(rs.next())
{
stkQty=rs.getDouble(1);
noArticle=rs.getDouble(2);
}
rs.close();
rs=null;
pstmt.close();
pstmt=null;
System.out.println("QcstkQty::["+stkQty+"]");
System.out.println("QcnoArticle::["+noArticle+"]");
if(stkQty>0 && noArticle<=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+"' ";
System.out.println("sql---"+sql);
pstmt=conn.prepareStatement(sql);
pstmt.executeUpdate();
pstmt.close();
pstmt=null;
}
if(stkQty==0 && noArticle!=0)
{
sql="update stock set no_art=0 " +
" 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+"' ";
System.out.println("sql---"+sql);
pstmt=conn.prepareStatement(sql);
pstmt.executeUpdate();
pstmt.close();
pstmt=null;
}
//End by chandrashekar dtd 05/02/2015 to update no_art
}
}else{
sql = "select inv_stat from location where loc_code = '"+this.locationCode+"'";
......
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