Commit 46a16bbd authored by manohar's avatar manohar

all changes for sun merged


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@91082 ce508802-f39f-4f6c-b175-0d175dae99d5
parent a056cd1a
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Developed by : Niraja Developed by : Niraja
Company : Base Information Management Pvt. Ltd Company : Base Information Management Pvt. Ltd
Version : 1.0 Version : 1.0
Date :01/12/2005 Date :01/12/2005
*/ */
package ibase.webitm.ejb.dis.adv; package ibase.webitm.ejb.dis.adv;
...@@ -252,7 +252,7 @@ public class AssociateAct extends ActionHandlerEJB implements AssociateActLocal, ...@@ -252,7 +252,7 @@ public class AssociateAct extends ActionHandlerEJB implements AssociateActLocal,
sql = sql + " case when c.loc_type__parent is null then c.loc_type else c.loc_type__parent end loc_type, "; sql = sql + " case when c.loc_type__parent is null then c.loc_type else c.loc_type__parent end loc_type, ";
if((replRate != null && replRate.trim().length() > 0) && replRate.equals("1")) if((replRate != null && replRate.trim().length() > 0) && replRate.equals("1"))
{ {
sql = sql + "(d.rate) ac_rate"; sql = sql + "(fn_get_sord_rate (b.sale_order, b.line_no)) ac_rate";
} }
else else
{ {
...@@ -261,13 +261,13 @@ public class AssociateAct extends ActionHandlerEJB implements AssociateActLocal, ...@@ -261,13 +261,13 @@ public class AssociateAct extends ActionHandlerEJB implements AssociateActLocal,
//sql = sql + "(case when '" + ls_repl_rate + "' = '1' then d.rate else 0 end) ac_rate "; //sql = sql + "(case when '" + ls_repl_rate + "' = '1' then d.rate else 0 end) ac_rate ";
// 20/03/09 manoharan seperate connection instead of synonym // 20/03/09 manoharan seperate connection instead of synonym
//sql = sql + " from sorditem_cp b, item c, sorder_cp a, sorddet_cp d where "; //sql = sql + " from sorditem_cp b, item c, sorder_cp a, sorddet_cp d where ";
sql = sql + " from sorditem b, item c, sorder a, sorddet d where "; // 27/03/09 manoharan sorddet removed and function used
//sql = sql + " from sorditem b, item c, sorder a, sorddet d where ";
sql = sql + " from sorditem b, item c, sorder a where ";
sql = sql + " a.sale_order = b.sale_order "; sql = sql + " a.sale_order = b.sale_order ";
sql = sql + " and b.item_code = c.item_code "; sql = sql + " and b.item_code = c.item_code ";
sql = sql + " and b.sale_order = d.sale_order "; //sql = sql + " and b.sale_order = d.sale_order ";
sql = sql + " and b.line_no = d.line_no "; //sql = sql + " and b.line_no = d.line_no ";
sql = sql + " and b.site_code = ? ";
sql = sql + " and b.nature like ? ";
if((dateFlag != null && dateFlag.trim().length() > 0) && dateFlag.equalsIgnoreCase("O") ) if((dateFlag != null && dateFlag.trim().length() > 0) && dateFlag.equalsIgnoreCase("O") )
{ {
sql = sql + " and a.order_date >= ?"; sql = sql + " and a.order_date >= ?";
...@@ -275,14 +275,16 @@ public class AssociateAct extends ActionHandlerEJB implements AssociateActLocal, ...@@ -275,14 +275,16 @@ public class AssociateAct extends ActionHandlerEJB implements AssociateActLocal,
} }
else if((dateFlag != null && dateFlag.trim().length() > 0) && dateFlag.equalsIgnoreCase("D") ) else if((dateFlag != null && dateFlag.trim().length() > 0) && dateFlag.equalsIgnoreCase("D") )
{ {
sql = sql + " and d.dsp_date >= ?"; sql = sql + " and fn_get_dsp_date(b.sale_order, b.line_no) >= ?";
sql = sql + " and d.dsp_date <= ?"; sql = sql + " and fn_get_dsp_date(b.sale_order, b.line_no) <= ?";
} }
sql = sql + " and b.site_code = ? ";
sql = sql + " and (case when a.order_type is null then ' ' else a.order_type end ) like '" + orderType + "'";
sql = sql + " and (a.status is null or a.status = 'P') "; sql = sql + " and (a.status is null or a.status = 'P') ";
sql = sql + " and b.nature like ? ";
sql = sql + " and b.line_type <> 'B' "; sql = sql + " and b.line_type <> 'B' ";
sql = sql + " and (b.quantity - qty_desp) > 0 "; sql = sql + " and (b.quantity - qty_desp) > 0 ";
sql = sql + " and (case when a.order_type is null then ' ' else a.order_type end ) like '" + orderType; sql = sql + " ) ";
sql = sql + "' ) ";
sql = sql + " group by item_code, descr, unit, loc_type , ac_rate "; sql = sql + " group by item_code, descr, unit, loc_type , ac_rate ";
sql = sql + " order by descr" ; sql = sql + " order by descr" ;
} }
...@@ -309,8 +311,15 @@ public class AssociateAct extends ActionHandlerEJB implements AssociateActLocal, ...@@ -309,8 +311,15 @@ public class AssociateAct extends ActionHandlerEJB implements AssociateActLocal,
pstmtCP.setString(2,mnature); pstmtCP.setString(2,mnature);
if((dateFlag != null && dateFlag.trim().length() > 0) && (dateFlag.equalsIgnoreCase("D") || dateFlag.equalsIgnoreCase("O") ) ) if((dateFlag != null && dateFlag.trim().length() > 0) && (dateFlag.equalsIgnoreCase("D") || dateFlag.equalsIgnoreCase("O") ) )
{ {
pstmtCP.setTimestamp(3,java.sql.Timestamp.valueOf(genericUtility.getValidDateTimeString(fromDate,genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()))); pstmtCP.setTimestamp(1,java.sql.Timestamp.valueOf(genericUtility.getValidDateTimeString(fromDate,genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat())));
pstmtCP.setTimestamp(4,java.sql.Timestamp.valueOf(genericUtility.getValidDateTimeString(toDate,genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()))); pstmtCP.setTimestamp(2,java.sql.Timestamp.valueOf(genericUtility.getValidDateTimeString(toDate,genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat())));
pstmtCP.setString(3,siteCode);
pstmtCP.setString(4,mnature);
}
else
{
pstmtCP.setString(1,siteCode);
pstmtCP.setString(2,mnature);
} }
// end 20/03/09 manoharan seperate connection instead of synonym // end 20/03/09 manoharan seperate connection instead of synonym
//pstmt.setString(4,siteCode);//Added by Jiten 09/10/06 as sql changed in PB //pstmt.setString(4,siteCode);//Added by Jiten 09/10/06 as sql changed in PB
......
...@@ -25,7 +25,7 @@ import javax.ejb.Stateless; // added for ejb3 ...@@ -25,7 +25,7 @@ import javax.ejb.Stateless; // added for ejb3
@Stateless // added for ejb3 @Stateless // added for ejb3
public class CustStockTransitConf extends ActionHandlerEJB //implements SessionBean public class CustStockTransitConf extends ActionHandlerEJB implements CustStockTransitConfLocal, CustStockTransitConfRemote //implements SessionBean
{ {
/* public void ejbCreate() throws RemoteException,CreateException{ /* public void ejbCreate() throws RemoteException,CreateException{
} }
......
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