Commit dfb593bf authored by kshinde's avatar kshinde

Changed loop For free quantity not setting properly after confirm.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@105272 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 3f6a91f9
...@@ -2171,6 +2171,9 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor ...@@ -2171,6 +2171,9 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
aminqty = rs2.getDouble("app_min_qty"); aminqty = rs2.getDouble("app_min_qty");
amaxqty = rs2.getDouble("app_max_qty"); amaxqty = rs2.getDouble("app_max_qty");
mnature = rs2.getString("nature"); mnature = rs2.getString("nature");
System.out.println("aminqty"+aminqty+" "+"amaxqty"+amaxqty);
System.out.println("mreqtype"+mreqtype);
} }
rs2.close(); rs2.close();
rs2 = null; rs2 = null;
...@@ -2191,19 +2194,28 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor ...@@ -2191,19 +2194,28 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
} }
if("S".equalsIgnoreCase(mreqtype)) if("S".equalsIgnoreCase(mreqtype))
{ {
mqty=(quantity/mbatqty)*mqtyper; mqty=(quantity/mbatqty)*mqtyper;
System.out.println("mqty S:::"+mqty);
}else if("P".equalsIgnoreCase(mreqtype)) }else if("P".equalsIgnoreCase(mreqtype))
{ {
mqty=(mqtyper/mbatqty)*quantity; mqty=(mqtyper/mbatqty)*quantity;
System.out.println("mqty P:::"+mqty);
}else if("F".equalsIgnoreCase(mreqtype)) }else if("F".equalsIgnoreCase(mreqtype))
{ {
mqty=mqtyper; mqty=mqtyper;
System.out.println("mqty F:::"+mqty);
} }
if(mqty<mminqty) if(mqty<mminqty)
{ {
mminqty=mqty; mminqty=mqty;
}else System.out.println("mqty<mminqty:::::"+mqty);
}
}
else
{ {
System.out.println("mqty S:::"+mqty);
mqty=quantity; mqty=quantity;
sql2="select unit from item where item_code = ?"; sql2="select unit from item where item_code = ?";
...@@ -2252,7 +2264,8 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor ...@@ -2252,7 +2264,8 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
{ {
merrstr = "VTITEM1"; merrstr = "VTITEM1";
} }
}else }
else
{ {
sql2="select item_stru from item where item_code = ?"; sql2="select item_stru from item where item_code = ?";
pstmt2 = conn.prepareStatement(sql2); pstmt2 = conn.prepareStatement(sql2);
...@@ -2261,6 +2274,7 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor ...@@ -2261,6 +2274,7 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
if (rs2.next()) if (rs2.next())
{ {
mexptype = rs2.getString("item_stru"); mexptype = rs2.getString("item_stru");
System.out.println("mexptype"+mexptype);
} }
rs2.close(); rs2.close();
rs2 = null; rs2 = null;
...@@ -2435,7 +2449,7 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor ...@@ -2435,7 +2449,7 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
pstmt1.close(); pstmt1.close();
pstmt1 = null; pstmt1 = null;
}
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
......
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