Commit 067963b8 authored by rtiwari's avatar rtiwari

updated


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@94084 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 6f58a384
......@@ -218,10 +218,11 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr
issQty = rs.getDouble("quantity");
sql = "select SUM(quantity) from stock_transfer_det where tran_id in (select tran_id from stock_transfer " +
"where ref_id__for = ?) and item_code = ? ";
" where ref_id__for = ?) and item_code = ? and lot_no__fr = ? ";
pstmt1 = conn.prepareStatement(sql);
pstmt1.setString(1, worder);
pstmt1.setString(2, rs.getString("item_code"));
pstmt1.setString(3, rs.getString("lot_no"));
rs1 = pstmt1.executeQuery();
if ( rs1.next() )
{
......@@ -274,7 +275,7 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr
pstmt1 = null;
if(allocQty > integralQty ){
if(allocQty % integralQty != 0)
if(allocQty % integralQty != 0 && integralQty != 0)
{
retTabSepStrBuff.append("<quantity>").append("<![CDATA[" + df.format((integralQty - (allocQty % integralQty) + allocQty)) +"]]>").append("</quantity>");
}
......@@ -285,6 +286,11 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr
}else{
retTabSepStrBuff.append("<quantity>").append("<![CDATA[" + df.format(integralQty) +"]]>").append("</quantity>");
}
if(integralQty == 0)
{
retTabSepStrBuff.append("<quantity>").append("<![CDATA[" + df.format(allocQty) +"]]>").append("</quantity>");
}
retTabSepStrBuff.append("<allocated_qty>").append("<![CDATA[" + df.format(allocatedQty) +"]]>").append("</allocated_qty>");
retTabSepStrBuff.append("<remarks>").append("<![CDATA[" + rs.getString("remarks") +"]]>").append("</remarks>");
......@@ -667,7 +673,7 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr
userId = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode"); System.out.println("--login code--"+userId);
termId = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "termId"); System.out.println("--term id--"+termId);
sql = "SELECT EMP_CODE FROM USERS WHERE CODE = ? ";
sql = "SELECT C FROM USERS WHERE CODE = ? ";
pstmt = connOne.prepareStatement(sql);
pstmt.setString(1, userId);
rs = pstmt.executeQuery();
......
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