Commit ad05cfee authored by kdabholkar's avatar kdabholkar

commited new code inside invoiceProcess() in PostOrdInvoiceGen Componant.

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@173121 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 35b20269
...@@ -55,8 +55,8 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB ...@@ -55,8 +55,8 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB
String descpIdFrm,String orderType,Timestamp frmDateStr,String clubOrder,String clubPendOrder, String descpIdFrm,String orderType,Timestamp frmDateStr,String clubOrder,String clubPendOrder,
String adjDrCr,String adjCustAdv,String advAdjMode,String adjNewPrdInv,String xtraParams,Connection conn) throws ITMException, Exception String adjDrCr,String adjCustAdv,String advAdjMode,String adjNewPrdInv,String xtraParams,Connection conn) throws ITMException, Exception
{ {
String retString="",frmDate="",frmCustCode="",currCode="",lrNo="",lrDate="",remarks="",sysDate="",toDateStr=""; String retString="",frmDate="",frmCustCode="",currCode="",neworderType="",lrNo="",lrDate="",remarks="",sysDate="",toDateStr="";
String toCustCode="",stanCodeInit="",descpIdTo="", neworderType=""; String toCustCode="",stanCodeInit="",descpIdTo="";
String runOpt="*"; String runOpt="*";
boolean lbClubOrders=false,lbClub=false,lbDrCr=false,lbAdv=false,lbCustomer=false,lbNewPrdInv=false,tempflag=false; boolean lbClubOrders=false,lbClub=false,lbDrCr=false,lbAdv=false,lbCustomer=false,lbNewPrdInv=false,tempflag=false;
String sql="", currCodefrtBase = "",siteCode = ""; String sql="", currCodefrtBase = "",siteCode = "";
...@@ -114,16 +114,22 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB ...@@ -114,16 +114,22 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB
// frmDateStr="";//ld_from_date // frmDateStr="";//ld_from_date
/* Chnaged by Kaustubh on 6 Nov 2017 as told by Pragyan Sir comment the original else code and just add one line code as shown below*/ /*
if(orderType==null || orderType.trim().length()==0)
{
orderType="%";
}
else
{*/
/* changed by kaustubh on 6 nov 2017 as per told by pragyan sir added new else in below code */
if(orderType==null || orderType.trim().length()==0) if(orderType==null || orderType.trim().length()==0)
{ {
orderType="%"; orderType="%";
} }
else else
{ {
neworderType =orderType.substring(0,1)+"%"; orderType =orderType.substring(0,1)+"%";
System.out.println("neworderType::"+neworderType); System.out.println("orderType::"+orderType);
} }
// System.out.println("Insidingggg else part of order type:::::::::::"+orderType); // System.out.println("Insidingggg else part of order type:::::::::::"+orderType);
...@@ -131,7 +137,7 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB ...@@ -131,7 +137,7 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB
* select desp_date,cust_code, curr_code, * select desp_date,cust_code, curr_code,
* lr_no, lr_date, remarks from table 'despatch' * lr_no, lr_date, remarks from table 'despatch'
* */ * */
/* sql="select desp_date, cust_code, curr_code, lr_no, lr_date, remarks,exch_rate, site_code from despatch where desp_id=?"; sql="select desp_date, cust_code, curr_code, lr_no, lr_date, remarks,exch_rate, site_code from despatch where desp_id=?";
pstmt=conn.prepareStatement(sql); pstmt=conn.prepareStatement(sql);
pstmt.setString(1, descpIdFrm); pstmt.setString(1, descpIdFrm);
rs=pstmt.executeQuery(); rs=pstmt.executeQuery();
...@@ -163,20 +169,20 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB ...@@ -163,20 +169,20 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB
lrDate=""; lrDate="";
} }
// System.out.println("lrDate>>>"+lrDate); // System.out.println("lrDate>>>"+lrDate);
*//** /**
* Check lrDate is not null * Check lrDate is not null
* *//* * */
if(lrDate!=null && lrDate.trim().length()>0) if(lrDate!=null && lrDate.trim().length()>0)
{ {
exchangeRate=0.0; exchangeRate=0.0;
*//** /**
* select exch_rate__sell * select exch_rate__sell
* from table 'daily_exch_rate_sell_buy' * from table 'daily_exch_rate_sell_buy'
* for lrDate in between from_date and to_date * for lrDate in between from_date and to_date
* and curr_code,curr_code__to='RS' * and curr_code,curr_code__to='RS'
* *//* * */
28-Nov-16 manoharan /* 28-Nov-16 manoharan
sql="select exch_rate__sell from daily_exch_rate_sell_buy where ? between from_date and to_date" sql="select exch_rate__sell from daily_exch_rate_sell_buy where ? between from_date and to_date"
+ " and curr_code = ? and curr_code__to = 'RS'"; + " and curr_code = ? and curr_code__to = 'RS'";
pstmt=conn.prepareStatement(sql); pstmt=conn.prepareStatement(sql);
...@@ -191,7 +197,7 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB ...@@ -191,7 +197,7 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB
pstmt=null; pstmt=null;
rs.close(); rs.close();
rs=null; rs=null;
*/
exchangeRate = finCommon.getDailyExchRateSellBuy(currCode, currCodefrtBase, siteCode, lrDate, "S", conn); exchangeRate = finCommon.getDailyExchRateSellBuy(currCode, currCodefrtBase, siteCode, lrDate, "S", conn);
} }
...@@ -277,9 +283,9 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB ...@@ -277,9 +283,9 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB
} }
tempflag=true; tempflag=true;
*//** /**
* Create Invoice header * Create Invoice header
* *//* * */
//System.out.println("@@@@@@@@@@260:::::ldsInvHdrMp["+ldsInvHdrMp+"]"); //System.out.println("@@@@@@@@@@260:::::ldsInvHdrMp["+ldsInvHdrMp+"]");
//Changed By Nasruddin Start 04-11-16 //Changed By Nasruddin Start 04-11-16
...@@ -290,7 +296,7 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB ...@@ -290,7 +296,7 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB
//Changed By Nasruddin END 04-11-16 //Changed By Nasruddin END 04-11-16
//fos1.write(("\n \n Final Return String :- [" + retString +"]\r\n").getBytes()); //fos1.write(("\n \n Final Return String :- [" + retString +"]\r\n").getBytes());
} */ //}
//} //}
endTime = System.currentTimeMillis(); endTime = System.currentTimeMillis();
......
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