Commit 35b20269 authored by kdabholkar's avatar kdabholkar

commited new code inside invoiceProcess()

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@173119 ce508802-f39f-4f6c-b175-0d175dae99d5
parent a39f4c5e
...@@ -56,7 +56,7 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB ...@@ -56,7 +56,7 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB
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="",lrNo="",lrDate="",remarks="",sysDate="",toDateStr="";
String toCustCode="",stanCodeInit="",descpIdTo=""; String toCustCode="",stanCodeInit="",descpIdTo="", neworderType="";
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,6 +114,7 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB ...@@ -114,6 +114,7 @@ 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) if(orderType==null || orderType.trim().length()==0)
{ {
...@@ -121,13 +122,16 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB ...@@ -121,13 +122,16 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB
} }
else else
{ {
neworderType =orderType.substring(0,1)+"%";
System.out.println("neworderType::"+neworderType);
}
// System.out.println("Insidingggg else part of order type:::::::::::"+orderType); // System.out.println("Insidingggg else part of order type:::::::::::"+orderType);
/** /**
* 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();
...@@ -159,20 +163,20 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB ...@@ -159,20 +163,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);
...@@ -187,7 +191,7 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB ...@@ -187,7 +191,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);
} }
...@@ -273,9 +277,9 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB ...@@ -273,9 +277,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
...@@ -286,7 +290,7 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB ...@@ -286,7 +290,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