Commit 91ba8a61 authored by caluka's avatar caluka

Change noArt logic by manoj sir while inserting stock transfer time.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@97977 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 53a1f645
...@@ -1096,7 +1096,8 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr ...@@ -1096,7 +1096,8 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr
String userId = ""; String userId = "";
String termId = ""; String termId = "";
String sql = "",sql1="", acctCodeInv1 = "",cctrCodeInv1=""; String sql = "",sql1="", acctCodeInv1 = "",cctrCodeInv1="";
String itemSer="",tranType="",noArt=""; String itemSer="",tranType="";
//,noArt="";
Date orddate = null; Date orddate = null;
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
ResultSet rs = null; ResultSet rs = null;
...@@ -1146,9 +1147,11 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr ...@@ -1146,9 +1147,11 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr
ArrayList hashMapList=new ArrayList(); ArrayList hashMapList=new ArrayList();
double aldAllocQty = 0d; double aldAllocQty = 0d;
double allocQtyDouble=0d;
String line = " " + lineno; String line = " " + lineno;
MfgCommon mfgComm = new MfgCommon(); MfgCommon mfgComm = new MfgCommon();
double qtyPerArtFr=0;
double noArt=0;
try try
{ {
invstat1 = mfgComm.getEnvMfg("999999","MAIN_ST_INVSTAT", connOne); invstat1 = mfgComm.getEnvMfg("999999","MAIN_ST_INVSTAT", connOne);
...@@ -1190,7 +1193,7 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr ...@@ -1190,7 +1193,7 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr
{ {
totWoQty = Double.parseDouble(df.format(rs.getDouble("quantity"))); totWoQty = Double.parseDouble(df.format(rs.getDouble("quantity")));
orddate = rs.getDate("ord_date"); orddate = rs.getDate("ord_date");
noArt = rs.getString("no_art")==null?"0":rs.getString("no_art"); //noArt = rs.getString("no_art")==null?"0":rs.getString("no_art");
} }
if(rs != null) if(rs != null)
rs.close(); rs.close();
...@@ -1211,7 +1214,7 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr ...@@ -1211,7 +1214,7 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr
{ {
totWoQty = Double.parseDouble(df.format(rs.getDouble("quantity"))); totWoQty = Double.parseDouble(df.format(rs.getDouble("quantity")));
orddate = rs.getDate("ord_date"); orddate = rs.getDate("ord_date");
noArt = rs.getString("no_art")==null?"0":rs.getString("no_art"); //noArt = rs.getString("no_art")==null?"0":rs.getString("no_art");
} }
if(rs != null) if(rs != null)
rs.close(); rs.close();
...@@ -1236,7 +1239,7 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr ...@@ -1236,7 +1239,7 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
sql1 = "select acct_code__inv, cctr_code__inv from stock where item_code = ? and site_code = ? and loc_code = ? and lot_no = ? and lot_sl = ? "; sql1 = "select acct_code__inv, cctr_code__inv,qty_per_art from stock where item_code = ? and site_code = ? and loc_code = ? and lot_no = ? and lot_sl = ? ";
pstmt = connOne.prepareStatement(sql1); pstmt = connOne.prepareStatement(sql1);
pstmt.setString(1,itemCode); pstmt.setString(1,itemCode);
pstmt.setString(2,siteCode); pstmt.setString(2,siteCode);
...@@ -1248,6 +1251,7 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr ...@@ -1248,6 +1251,7 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr
{ {
acctCodeInv1 = rs.getString("acct_code__inv")==null?"1440":rs.getString("acct_code__inv"); acctCodeInv1 = rs.getString("acct_code__inv")==null?"1440":rs.getString("acct_code__inv");
cctrCodeInv1 = rs.getString("cctr_code__inv")==null?"H651":rs.getString("cctr_code__inv"); cctrCodeInv1 = rs.getString("cctr_code__inv")==null?"H651":rs.getString("cctr_code__inv");
qtyPerArtFr = rs.getDouble("qty_per_art");
} }
if(rs != null) if(rs != null)
rs.close(); rs.close();
...@@ -1255,8 +1259,31 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr ...@@ -1255,8 +1259,31 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr
if(pstmt != null) if(pstmt != null)
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
//Start Added by chandrashekar on 18-05-2015
if (allocQty != null && allocQty.trim().length() > 0)
{
try
{
allocQtyDouble = Double.parseDouble(allocQty);
} catch (NumberFormatException n)
{
allocQtyDouble = 0;
}
}
//End Added by chandrashekar on 18-05-2015
//Added by manoj dtd 18/05/2015 to set noArt based on from location
if(qtyPerArtFr>0)
{
noArt=allocQtyDouble / qtyPerArtFr;
}
else
{
noArt=allocQtyDouble;
}
noArt= Math.ceil(noArt);
System.out.println("noArt after ceil>>"+noArt);
System.out.println("::: XML Cretation::::");
xmlBuff.append("<?xml version='1.0' encoding='ISO-8859-1'?>\n"); xmlBuff.append("<?xml version='1.0' encoding='ISO-8859-1'?>\n");
xmlBuff.append("<DocumentRoot>"); xmlBuff.append("<DocumentRoot>");
......
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