Commit cc368252 authored by dsawant's avatar dsawant

updated


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@96083 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 8055a6fc
......@@ -116,7 +116,7 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
PreparedStatement pstmt = null ;
ResultSet rs = null;
String sql = "",locCode ="",invstat="",aval="",avalyn="";
double qtyConf=0,qtyShip=0,totQty=0,detquantity=0,stkquantity=0,quantity=0,totquantity=0;
double qtyConf=0,qtyShip=0,totQty=0,detquantity=0,stkquantity=0,quantity=0,totquantity=0,dodetquantity=0;
String squantity="",distOrder = "",itemCode="",confirmed="",tranId="",siteCode="",lotSl="",addUser="",tranCode="";
try {
......@@ -431,6 +431,7 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
distOrder = genericUtility.getColumnValue("dist_order",dom2);
squantity = genericUtility.getColumnValue("quantity",dom2);
siteCode = genericUtility.getColumnValue("site_code",dom2);
itemCode = genericUtility.getColumnValue("item_code",dom2);
lotSl = genericUtility.getColumnValue("lot_sl",dom2);
System.out.println("squantity"+squantity+"workOrder<><><>"+distOrder+">>D"+siteCode+"FDFf"+lotSl);
if (squantity == null || squantity.trim().length() == 0)
......@@ -441,8 +442,8 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
{
quantity = Double.parseDouble(squantity);
}
sql = "select quantity from stock where site_code = ? AND LOT_SL = ? AND QUANTITY > 0";
System.out.println("quantity>>>>>>{{{"+quantity);
/*sql = "select quantity from stock where site_code = ? AND LOT_SL = ? AND QUANTITY > 0";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1,siteCode);
pstmt.setString(2,lotSl);
......@@ -455,10 +456,12 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
rs.close();
pstmt = null;
rs = null;
System.out.println("stkquantity>>"+stkquantity);
sql = "select sum(quantity) from distord_issdet where dist_order = ?";
System.out.println("stkquantity>>"+stkquantity);*/
sql = "select sum(quantity) from distord_issdet where dist_order = ? and lot_sl = ? and item_code = ?";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1,distOrder);
pstmt.setString(2,lotSl);
pstmt.setString(3,itemCode);
rs = pstmt.executeQuery();
if(rs.next())
{
......@@ -469,13 +472,39 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
pstmt = null;
rs = null;
System.out.println("detquantity>>"+detquantity);
totquantity = detquantity + quantity;
sql = "select sum(qty_order) from distorder_det where dist_order = ? and item_code = ?";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1,distOrder);
pstmt.setString(2,itemCode);
rs = pstmt.executeQuery();
if(rs.next())
{
dodetquantity = rs.getDouble(1);
}
pstmt.close();
rs.close();
pstmt = null;
rs = null;
if(totquantity > dodetquantity)
{
errCode = "DIDOQUANDT";
errString = getErrorString("quantity",errCode,userId);
break;
}
/*else
{
if(totquantity > stkquantity)
{
errCode = "DIDOQUANST";
errString = getErrorString("quantity",errCode,userId);
break;
}
}*/
}
......@@ -541,6 +570,13 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
break;
}
}
else
{
errCode = "DIDOAVLN";
errString = getErrorString("loc_code",errCode,userId);
break;
}
}
}
......@@ -818,6 +854,7 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
valueXmlString.append("<site_state_code_bill><![CDATA[]]></site_state_code_bill>");
valueXmlString.append("<pallet_wt><![CDATA[]]></pallet_wt>");
valueXmlString.append("<auto_receipt><![CDATA[N]]></auto_receipt>");
System.out.println("chgUser>>"+rs.getString("add_user")==null?"":rs.getString("add_user")+">>>chgTerm"+rs.getString("add_term")==null?"":rs.getString("add_term")+"currAppdate>>>"+currAppdate);
valueXmlString.append("<add_user><![CDATA["+(rs.getString("add_user")==null?"":rs.getString("add_user").trim())+"]]></add_user>");
valueXmlString.append("<add_term><![CDATA["+(rs.getString("add_term")==null?"":rs.getString("add_term").trim())+"]]></add_term>");
valueXmlString.append("<add_date>").append("<![CDATA[" + currAppdate + "]]>").append("</add_date>");
......@@ -934,6 +971,7 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
valueXmlString.append("<site_state_code_bill><![CDATA[]]></site_state_code_bill>");
valueXmlString.append("<pallet_wt><![CDATA[]]></pallet_wt>");
valueXmlString.append("<auto_receipt><![CDATA[N]]></auto_receipt>");
System.out.println("chgUser>>"+chgUser+">>>chgTerm"+chgTerm+"currAppdate>>>"+currAppdate);
valueXmlString.append("<add_user>").append("<![CDATA[" + chgUser + "]]>").append("</add_user>"); //changes done by deepak
valueXmlString.append("<add_term>").append("<![CDATA[" + chgTerm + "]]>").append("</add_term>");
valueXmlString.append("<add_date>").append("<![CDATA[" + currAppdate + "]]>").append("</add_date>");
......@@ -2023,13 +2061,13 @@ public class DistIssWiz extends ValidatorEJB implements DistIssWizLocal, DistIss
if(! lsTranTypeParent.equalsIgnoreCase(lsTranType.trim()))
{
detail2hdr.append("<quantity>"+lcQty+"</quantity>");
// detail2hdr.append("<quantity>"+lcQty+"</quantity>");
detail2hdr.append("<qty_order__alt>"+lcQty+"</qty_order__alt>");
lcQty = lcQty;
}
else
{
detail2hdr.append("<quantity>"+mQty+"</quantity>");
// detail2hdr.append("<quantity>"+mQty+"</quantity>");
detail2hdr.append("<qty_order__alt>"+mQty+"</qty_order__alt>");
lcQty = mQty;
}
......
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