Commit 8502a26f authored by Ketan Patil's avatar Ketan Patil

Replace CashVoucherCreateMisc.java

parent 9a389127
......@@ -90,7 +90,8 @@ public class CashVoucherCreateMisc extends ActionHandlerEJB implements CashVouch
if (userInfoBean.getTransDB().length() > 0)
{
conn = connDriver.getConnectDB(userInfoBean.getTransDB());
// conn = connDriver.getConnectDB(userInfoBean.getTransDB());
conn= getConnection();
}
else
{
......@@ -311,9 +312,10 @@ public class CashVoucherCreateMisc extends ActionHandlerEJB implements CashVouch
//added by pravin nevage 20/9/22
String vouchMiscId="";
String sql22 = "select misc_voucher.tran_id as mvouch from misc_voucher,misc_vouchdet where misc_voucher.tran_id=misc_vouchdet.tran_id and misc_voucher.tran_type='CVH' and misc_voucher.order_ref= ? ";
String sql22 = "select misc_voucher.tran_id as mvouch from misc_voucher,misc_vouchdet where misc_voucher.tran_id=misc_vouchdet.tran_id and misc_voucher.tran_type='CVH' and misc_voucher.order_ref= '"+tranId+"' ";
System.out.println("sql22==>>"+sql22);
PreparedStatement pstmt1 = conn.prepareStatement(sql22);
pstmt1.setString(1,tranId);
//pstmt1.setString(1,tranId);
ResultSet rs2 = pstmt1.executeQuery();
if(rs2.next())
{
......@@ -702,13 +704,13 @@ public String createHashmapForMiscVoucher(String tranID, String xtraParams, Stri
{
vouchType="O";
advAcctCode="";
billNo=tranID+"/CASH";
billNo=tranID.trim()+"-CASH";
}
else if(tranType.equalsIgnoreCase("A"))
{
vouchType="A";
advAcctCode=advAcctCode.trim();
billNo=tranID+"/ADVANCE";
billNo=tranID.trim()+"-ADVANCE";
}
System.out.println("vouchType : ["+vouchType+"]");
System.out.println("advAcctCode : ["+advAcctCode+"]");
......
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