Commit eb955912 authored by manohar's avatar manohar

stock transfer multiple if quantity is not entered also populate the stock for all selected


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@91599 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 370ddb10
...@@ -308,6 +308,7 @@ public class GenStkHelpAct extends ActionHandlerEJB implements GenStkHelpActLoca ...@@ -308,6 +308,7 @@ public class GenStkHelpAct extends ActionHandlerEJB implements GenStkHelpActLoca
Statement stmt = null; Statement stmt = null;
PreparedStatement pstmt =null; PreparedStatement pstmt =null;
ResultSet rs = null; ResultSet rs = null;
boolean lbDefault = false;
try try
{ {
conn = connDriver.getConnectDB("DriverITM"); conn = connDriver.getConnectDB("DriverITM");
...@@ -341,11 +342,13 @@ public class GenStkHelpAct extends ActionHandlerEJB implements GenStkHelpActLoca ...@@ -341,11 +342,13 @@ public class GenStkHelpAct extends ActionHandlerEJB implements GenStkHelpActLoca
quantity = "0"; quantity = "0";
} }
//Added by Alka 31/05/07 -- Entering Required Quantity in the Screen is necessary //Added by Alka 31/05/07 -- Entering Required Quantity in the Screen is necessary
// 20/03/12 manoharan if quantity not entered transfer all
if (Double.parseDouble(quantity) == 0) if (Double.parseDouble(quantity) == 0)
{ {
errCode = "VTQUAN"; lbDefault = true;
errString = itmDbAccess.getErrorString("quantity", errCode, userId, "", conn); //errCode = "VTQUAN";
return errString; //errString = itmDbAccess.getErrorString("quantity", errCode, userId, "", conn);
//return errString;
} }
// end Added by Alka 31/05/07 // end Added by Alka 31/05/07
...@@ -355,8 +358,12 @@ public class GenStkHelpAct extends ActionHandlerEJB implements GenStkHelpActLoca ...@@ -355,8 +358,12 @@ public class GenStkHelpAct extends ActionHandlerEJB implements GenStkHelpActLoca
{ {
issCriteria = rs.getString("ISS_CRITERIA"); issCriteria = rs.getString("ISS_CRITERIA");
} }
// 20/03/12 manoharan
detailList = selDataDom.getElementsByTagName("Detail"); detailList = selDataDom.getElementsByTagName("Detail");
detailListLength = detailList.getLength(); detailListLength = detailList.getLength();
if (lbDefault == false)
{
for (int i = 0;i < detailListLength;i++ ) for (int i = 0;i < detailListLength;i++ )
{ {
stkQtyStr = GenericUtility.getInstance().getColumnValueFromNode("net_available",detailList.item(i)); stkQtyStr = GenericUtility.getInstance().getColumnValueFromNode("net_available",detailList.item(i));
...@@ -371,10 +378,14 @@ public class GenStkHelpAct extends ActionHandlerEJB implements GenStkHelpActLoca ...@@ -371,10 +378,14 @@ public class GenStkHelpAct extends ActionHandlerEJB implements GenStkHelpActLoca
errString = itmDbAccess.getErrorString("quantity", errCode, userId, "", conn); //Added by Alka 31/05/07 errString = itmDbAccess.getErrorString("quantity", errCode, userId, "", conn); //Added by Alka 31/05/07
return errString; //Added by Alka 31/05/07 return errString; //Added by Alka 31/05/07
} }
}
if (lbDefault == false)
{
ordQuantity = Double.parseDouble(quantity); ordQuantity = Double.parseDouble(quantity);
}
// end 20/03/12 manoharan
System.out.println("issCriteria ::"+issCriteria); System.out.println("issCriteria ::"+issCriteria);
System.out.println("ordQuantity ::"+ordQuantity); System.out.println("manohar 20/03/12 ordQuantity before ["+ordQuantity + "] detailListLength [" + detailListLength + "]");
for (int ctr = 0;ctr < detailListLength;ctr++) for (int ctr = 0;ctr < detailListLength;ctr++)
{ {
...@@ -383,6 +394,13 @@ public class GenStkHelpAct extends ActionHandlerEJB implements GenStkHelpActLoca ...@@ -383,6 +394,13 @@ public class GenStkHelpAct extends ActionHandlerEJB implements GenStkHelpActLoca
selLotSl = GenericUtility.getInstance().getColumnValueFromNode("lot_sl",detailList.item(ctr)); selLotSl = GenericUtility.getInstance().getColumnValueFromNode("lot_sl",detailList.item(ctr));
selUnit = GenericUtility.getInstance().getColumnValueFromNode("unit",detailList.item(ctr)); selUnit = GenericUtility.getInstance().getColumnValueFromNode("unit",detailList.item(ctr));
selQuantity = GenericUtility.getInstance().getColumnValueFromNode("net_available",detailList.item(ctr)); selQuantity = GenericUtility.getInstance().getColumnValueFromNode("net_available",detailList.item(ctr));
// 20/03/12 manoharan
if (lbDefault == true)
{
ordQuantity = Double.parseDouble(selQuantity);
}
System.out.println("manohar 20/03/12 ordQuantity after ["+ordQuantity + "]");
// 20/03/12 manoharan
// selStkRate = GenericUtility.getInstance().getColumnValueFromNode("stock_rate",detailList.item(ctr)); //stock-rate is wrongly placed Gulzar - 10/05/07 // selStkRate = GenericUtility.getInstance().getColumnValueFromNode("stock_rate",detailList.item(ctr)); //stock-rate is wrongly placed Gulzar - 10/05/07
//selStkRate = GenericUtility.getInstance().getColumnValueFromNode("rate",detailList.item(ctr)); //stock-rate is changed to rate Gulzar - 10/05/07 //selStkRate = GenericUtility.getInstance().getColumnValueFromNode("rate",detailList.item(ctr)); //stock-rate is changed to rate Gulzar - 10/05/07
//if (selStkRate == null) //if (selStkRate == null)
...@@ -441,7 +459,7 @@ public class GenStkHelpAct extends ActionHandlerEJB implements GenStkHelpActLoca ...@@ -441,7 +459,7 @@ public class GenStkHelpAct extends ActionHandlerEJB implements GenStkHelpActLoca
+ " and site_CODE = ? " + " and site_CODE = ? "
+ " and loc_CODE = ? " + " and loc_CODE = ? "
+ " and lot_no = ? " + " and lot_no = ? "
+ " and lot_sl = ? "; + " and lot_sl = ? " ;
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1,itemCode); pstmt.setString(1,itemCode);
...@@ -542,7 +560,8 @@ public class GenStkHelpAct extends ActionHandlerEJB implements GenStkHelpActLoca ...@@ -542,7 +560,8 @@ public class GenStkHelpAct extends ActionHandlerEJB implements GenStkHelpActLoca
} // end 18/02/12 manoharan } // end 18/02/12 manoharan
valueXmlString.append("</Detail>"); valueXmlString.append("</Detail>");
if (ordQuantity == 0) //if (ordQuantity == 0 )
if (ordQuantity == 0 && lbDefault == false)
{ {
break; break;
} }
......
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