Commit 3bec8776 authored by cpatil's avatar cpatil

*** empty log message ***


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@92251 ce508802-f39f-4f6c-b175-0d175dae99d5
parent a40062be
...@@ -578,6 +578,7 @@ public class DistIssueAct extends ActionHandlerEJB implements DistIssueActLocal, ...@@ -578,6 +578,7 @@ public class DistIssueAct extends ActionHandlerEJB implements DistIssueActLocal,
SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat()); SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
//stmt = conn.createStatement(); //stmt = conn.createStatement();
distOrder = genericUtility.getColumnValue("dist_order",dom1); distOrder = genericUtility.getColumnValue("dist_order",dom1);
siteCode = genericUtility.getColumnValue("site_code",dom1);
System.out.println("distOrder :"+distOrder); System.out.println("distOrder :"+distOrder);
/*Commented for cross update need to entry in obj_forms /*Commented for cross update need to entry in obj_forms
grossWeight = genericUtility.getColumnValue("gross_weight",dom1); grossWeight = genericUtility.getColumnValue("gross_weight",dom1);
...@@ -619,11 +620,12 @@ public class DistIssueAct extends ActionHandlerEJB implements DistIssueActLocal, ...@@ -619,11 +620,12 @@ public class DistIssueAct extends ActionHandlerEJB implements DistIssueActLocal,
}*/ }*/
else if (count >= 1)//To be asked to Piyush Sir as it opens window for selecting a specific record. else if (count >= 1)//To be asked to Piyush Sir as it opens window for selecting a specific record.
{ {
sql = "SELECT TRAN_ID, TRAN_DATE, ORDER_NO, SITE_CODE " //sql = "SELECT TRAN_ID, TRAN_DATE, ORDER_NO, SITE_CODE FROM INV_PACK WHERE ORDER_NO = ? ";
+"FROM INV_PACK WHERE ORDER_NO = ? ";
//System.out.println("sql :"+sql); sql = " SELECT inv_pack.TRAN_ID,inv_pack.TRAN_DATE,inv_pack.ORDER_NO,inv_pack.SITE_CODE FROM INV_PACK inv_pack ,site site WHERE inv_pack.ORDER_NO = ? and inv_pack.site_code = site.site_code "; // modify by cpatil adding site_code joint on 5/11/12
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1,distOrder); pstmt.setString(1,distOrder);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
while (rs.next()) while (rs.next())
{ {
......
...@@ -1645,6 +1645,12 @@ public class WOrderIssueAct extends ActionHandlerEJB implements WOrderIssueActL ...@@ -1645,6 +1645,12 @@ public class WOrderIssueAct extends ActionHandlerEJB implements WOrderIssueActL
{ {
sql = sql + " AND c.loc_group = '" + locGroup + "' "; sql = sql + " AND c.loc_group = '" + locGroup + "' ";
} }
// added by cpatil start on 9/11/12
sql = sql + "order by (CASE WHEN SUM(A.QUANTITY - A.ALLOC_QTY) IS NULL THEN 0 ELSE SUM(A.QUANTITY - A.ALLOC_QTY) END) ";
// " order by sum( (case when quantity is null then 0 else quantity end) " +
// " - (case when alloc_qty is null then 0 else alloc_qty end) " +
// " - (case when hold_qty is null then 0 else hold_qty end) )";
// end by cpatil
// end 26/03/12 manoharan // end 26/03/12 manoharan
System.out.println("sqlSB converted ::: "+ sql); System.out.println("sqlSB converted ::: "+ sql);
StringTokenizer st = new StringTokenizer(sql, "?"); StringTokenizer st = new StringTokenizer(sql, "?");
...@@ -1741,6 +1747,13 @@ public class WOrderIssueAct extends ActionHandlerEJB implements WOrderIssueActL ...@@ -1741,6 +1747,13 @@ public class WOrderIssueAct extends ActionHandlerEJB implements WOrderIssueActL
{ {
sql = sql + " AND c.loc_group = '" + locGroup + "' "; sql = sql + " AND c.loc_group = '" + locGroup + "' ";
} }
// added by cpatil start on 9/11/12
sql = sql + " order by (A.QUANTITY - A.ALLOC_QTY) ";
//" order by sum( (case when quantity is null then 0 else quantity end) " +
//" - (case when alloc_qty is null then 0 else alloc_qty end) " +
// " - (case when hold_qty is null then 0 else hold_qty end) )";
// end by cpatil
// end 26/03/12 manoharan // end 26/03/12 manoharan
System.out.println("sqlSB1 converted ::: "+ sql); System.out.println("sqlSB1 converted ::: "+ sql);
...@@ -1946,6 +1959,12 @@ public class WOrderIssueAct extends ActionHandlerEJB implements WOrderIssueActL ...@@ -1946,6 +1959,12 @@ public class WOrderIssueAct extends ActionHandlerEJB implements WOrderIssueActL
{ {
sql = sql + " AND c.loc_group = '" + locGroup + "' "; sql = sql + " AND c.loc_group = '" + locGroup + "' ";
} }
// added by cpatil start on 9/11/12
sql = sql + " order by (CASE WHEN SUM(A.QUANTITY-A.ALLOC_QTY) IS NULL THEN 0 ELSE SUM(A.QUANTITY-A.ALLOC_QTY) END) ";
//" order by sum( (case when quantity is null then 0 else quantity end) " +
//" - (case when alloc_qty is null then 0 else alloc_qty end) " +
//" - (case when hold_qty is null then 0 else hold_qty end) )";
// end by cpatil
// end 26/03/12 manoharan // end 26/03/12 manoharan
System.out.println("sqlSB converted ::: "+ sql); System.out.println("sqlSB converted ::: "+ sql);
......
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