Commit 6d216ad6 authored by mmhatre's avatar mmhatre

Error related message are pass in getMsg Method

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@216484 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 80b787c6
...@@ -47,6 +47,7 @@ import ibase.webitm.ejb.ProcessEJB; ...@@ -47,6 +47,7 @@ import ibase.webitm.ejb.ProcessEJB;
import ibase.webitm.ejb.sys.UtilMethods; import ibase.webitm.ejb.sys.UtilMethods;
import ibase.webitm.utility.ITMException; import ibase.webitm.utility.ITMException;
@Stateless // added for ejb3 @Stateless // added for ejb3
public class MiscPayAutoPrc extends ProcessEJB implements MiscPayAutoPrcLocal,MiscPayAutoPrcRemote //SessionBean public class MiscPayAutoPrc extends ProcessEJB implements MiscPayAutoPrcLocal,MiscPayAutoPrcRemote //SessionBean
...@@ -583,7 +584,7 @@ public class MiscPayAutoPrc extends ProcessEJB implements MiscPayAutoPrcLocal,Mi ...@@ -583,7 +584,7 @@ public class MiscPayAutoPrc extends ProcessEJB implements MiscPayAutoPrcLocal,Mi
{ {
try try
{ {
conn.commit(); conn.commit();
if(conn != null) if(conn != null)
{ {
conn.close(); conn.close();
...@@ -1206,37 +1207,45 @@ public class MiscPayAutoPrc extends ProcessEJB implements MiscPayAutoPrcLocal,Mi ...@@ -1206,37 +1207,45 @@ public class MiscPayAutoPrc extends ProcessEJB implements MiscPayAutoPrcLocal,Mi
String temp = genericUtility.getColumnValueFromNode("pay_amt", parentNode1); String temp = genericUtility.getColumnValueFromNode("pay_amt", parentNode1);
mPayAmt = temp!= null && temp.trim().length()>0 ?Double.parseDouble(temp):0.0; mPayAmt = temp!= null && temp.trim().length()>0 ?Double.parseDouble(temp):0.0;
mChequeNo = genericUtility.getColumnValueFromNode("cheque_no", parentNode1); mChequeNo = genericUtility.getColumnValueFromNode("cheque_no", parentNode1);
//System.out.println("mpayamt"+mPayAmt+"\nnetpayable"+netPayable+"\ntotUnconfAmt"+totUnconfAmt);
//Modified by Anjali R. on [27/08/2018][Start] //Modified by Anjali R. on [27/08/2018][Start]
if(mPayAmt <= 0.0 || netPayable <= 0.0) if(mPayAmt <= 0.0 || netPayable <= 0.0)
{ {
String errStr = "Payment amount can not be zero or greater then balance amount: Series("+mTranSer+") Voucher No ("+mVouchNo+")"; String errStr = "Payment amount can not be zero or greater then balance amount: Series("+mTranSer+") Voucher No ("+mVouchNo+")";
//Modified by Anjali R. on[] //Modified by Anjali R. on[]
//errString = getErrorXML("PAYMENT NOT GENERATED", errStr, "VTPAYANTZR", "", "E"); //errString = getErrorXML("PAYMENT NOT GENERATED", errStr, "VTPAYANTZR", "", "E");
errString = getErrorMessage("PAYMENT NOT GENERATED", errStr, "VTPAYANTZR", "", "E"); //errString = getErrorMessage("PAYMENT NOT GENERATED", errStr, "VTPAYANTZR", "", "E");
return errString; errStr="PAYMENT NOT GENERATED"+errStr;
errorString=utilMethods.getMsg(errStr,"VTPAYANTZR",conn); //added by manish mhatre on 7-feb-2019
return errorString;
} }
else if (netPayable > 0 && (mPayAmt > netPayable || mPayAmt <= 0)) else if (netPayable > 0 && (mPayAmt > netPayable || mPayAmt <= 0))
{ {
String errStr = "Payment amount can not be zero or greater then balance amount: Series("+mTranSer+") Voucher No ("+mVouchNo+")"; String errStr = "Payment amount can not be zero or greater then balance amount: Series("+mTranSer+") Voucher No ("+mVouchNo+")";
//errString = getErrorXML("PAYMENT NOT GENERATED", errStr, "VTPAYANTZR", "", "E"); //errString = getErrorXML("PAYMENT NOT GENERATED", errStr, "VTPAYANTZR", "", "E");
errString = getErrorMessage("PAYMENT NOT GENERATED", errStr, "VTPAYANTZR", "", "E"); //errString = getErrorMessage("PAYMENT NOT GENERATED", errStr, "VTPAYANTZR", "", "E");
return errString; errStr="PAYMENT NOT GENERATED"+errStr;
errorString=utilMethods.getMsg(errStr,"VTPAYANTZR",conn); //added by manish mhatre on 7-feb-2019
return errorString;
} }
else if (netPayable < 0 && (mPayAmt < netPayable || mPayAmt >= 0) ) else if (netPayable < 0 && (mPayAmt < netPayable || mPayAmt >= 0) )
{ {
String errStr = "Payment amount can not be zero or greater then balance amount: Series("+mTranSer+") Voucher No ("+mVouchNo+")"; String errStr = "Payment amount can not be zero or greater then balance amount: Series("+mTranSer+") Voucher No ("+mVouchNo+")";
//errString = getErrorXML("PAYMENT NOT GENERATED", errStr, "VTPAYANTZR", "", "E"); //errString = getErrorXML("PAYMENT NOT GENERATED", errStr, "VTPAYANTZR", "", "E");
errString = getErrorMessage("PAYMENT NOT GENERATED", errStr, "VTPAYANTZR", "", "E"); //errString = getErrorMessage("PAYMENT NOT GENERATED", errStr, "VTPAYANTZR", "", "E");
return errString; errStr="PAYMENT NOT GENERATED"+errStr;
errorString=utilMethods.getMsg(errStr,"VTPAYANTZR",conn); //added by manish mhatre on 7-feb-2019
return errorString;
} }
else if(mPayAmt + totUnconfAmt > netPayable) else if(mPayAmt + totUnconfAmt > netPayable)
{ {
String errStr = "Payment Are Not Generated Due To Unconfirmed Payment Pending </br> Voucher No :"+mVouchNo+"" String errStr = "Payment Are Not Generated Due To Unconfirmed Payment Pending </br> Voucher No :"+mVouchNo+""
+ "Pay Amount:"+mPayAmt +"</br>Unconfirm Pay Amount:"+totUnconfAmt+" </br> Net Payable Amount:"+netPayable; + "Pay Amount:"+mPayAmt +"</br>Unconfirm Pay Amount:"+totUnconfAmt+" </br> Net Payable Amount:"+netPayable;
//errString = getErrorXML("PAYMENT NOT GENERATED", errStr, "VTPAYANTZR", "", "E"); //errString = getErrorXML("PAYMENT NOT GENERATED", errStr, "VTPAYANTZR", "", "E");
errString = getErrorMessage("PAYMENT NOT GENERATED", errStr, "VTPAYANTZR", "", "E"); //errString = getErrorMessage("PAYMENT NOT GENERATED", errStr, "VTPAYANTZR", "", "E");
return errString; errStr="PAYMENT NOT GENERATED"+errStr;
errorString=utilMethods.getMsg(errStr,"VTPAYANTZR",conn); //added by manish mhatre on 7-feb-2019
return errorString;
} }
//Modified by Anjali R. on [27/08/2018][End] //Modified by Anjali R. on [27/08/2018][End]
//Added by Varsha V on 25-06-18 //Added by Varsha V on 25-06-18
...@@ -1999,7 +2008,8 @@ public class MiscPayAutoPrc extends ProcessEJB implements MiscPayAutoPrcLocal,Mi ...@@ -1999,7 +2008,8 @@ public class MiscPayAutoPrc extends ProcessEJB implements MiscPayAutoPrcLocal,Mi
} }
confirmRetString = ""; confirmRetString = "";
confirmRetString = succesString + errorString; confirmRetString = succesString + errorString;
confirmRetString = getErrorMessage("", confirmRetString, "VTTRANCONF", "", "P"); //confirmRetString = getErrorMessage("", confirmRetString, "VTTRANCONF", "", "P");
confirmRetString=utilMethods.getMsg("","VTTRANCONF",conn); //added by manish mhatre on 7-feb-2019
} }
/*confirmRetString = ""; /*confirmRetString = "";
confirmRetString = succesString + errorString;*/ confirmRetString = succesString + errorString;*/
...@@ -2181,6 +2191,7 @@ public class MiscPayAutoPrc extends ProcessEJB implements MiscPayAutoPrcLocal,Mi ...@@ -2181,6 +2191,7 @@ public class MiscPayAutoPrc extends ProcessEJB implements MiscPayAutoPrcLocal,Mi
int count=0;//added by nandkumar gadkari on 15/10/19 int count=0;//added by nandkumar gadkari on 15/10/19
boolean sundryM=false;//added by nandkumar gadkari on 15/10/19 boolean sundryM=false;//added by nandkumar gadkari on 15/10/19
String sundryCodeM=""; String sundryCodeM="";
String errMsg="";
try try
{ {
genericUtility = new E12GenericUtility(); genericUtility = new E12GenericUtility();
...@@ -3525,7 +3536,8 @@ public class MiscPayAutoPrc extends ProcessEJB implements MiscPayAutoPrcLocal,Mi ...@@ -3525,7 +3536,8 @@ public class MiscPayAutoPrc extends ProcessEJB implements MiscPayAutoPrcLocal,Mi
confirmRetString = succesString+"</br>" + errorString; confirmRetString = succesString+"</br>" + errorString;
//Modified by Anjali R. on [25/02/2019][Start] //Modified by Anjali R. on [25/02/2019][Start]
//errString = confirmRetString; //errString = confirmRetString;
confirmRetString = getErrorMessage("", confirmRetString, "VTTRANCONF", "", "P"); //confirmRetString = getErrorMessage("", confirmRetString, "VTTRANCONF", "", "P");
confirmRetString=utilMethods.getMsg("","VTTRANCONF",conn); //added by manish mhatre on 7-feb-2019
//Modified by Anjali R. on [25/02/2019][End] //Modified by Anjali R. on [25/02/2019][End]
} }
/*confirmRetString = ""; /*confirmRetString = "";
...@@ -3541,6 +3553,7 @@ public class MiscPayAutoPrc extends ProcessEJB implements MiscPayAutoPrcLocal,Mi ...@@ -3541,6 +3553,7 @@ public class MiscPayAutoPrc extends ProcessEJB implements MiscPayAutoPrcLocal,Mi
} }
alreadyExist.clear(); alreadyExist.clear();
} }
errMsg=utilMethods.getMsg("", "VTTRANCONF",conn); //added by manish mhatre on 7-feb-2019
} }
catch(Exception e ) catch(Exception e )
{ {
...@@ -3582,7 +3595,8 @@ public class MiscPayAutoPrc extends ProcessEJB implements MiscPayAutoPrcLocal,Mi ...@@ -3582,7 +3595,8 @@ public class MiscPayAutoPrc extends ProcessEJB implements MiscPayAutoPrcLocal,Mi
} }
//Modified by Anjali R. on [25/02/2019][Start] //Modified by Anjali R. on [25/02/2019][Start]
//return confirmRetString; //return confirmRetString;
return getErrorMessage("", confirmRetString, "VTTRANCONF", "", "P"); //return getErrorMessage("", confirmRetString, "VTTRANCONF", "", "P");
return errMsg; //added by manish mhatre on 7-feb-2019
//Modified by Anjali R. on [25/02/2019][End] //Modified by Anjali R. on [25/02/2019][End]
} }
private String confirm(String tranId ,String xtraParams ,Connection conn) throws ITMException, Exception private String confirm(String tranId ,String xtraParams ,Connection conn) throws ITMException, Exception
...@@ -3620,7 +3634,7 @@ public class MiscPayAutoPrc extends ProcessEJB implements MiscPayAutoPrcLocal,Mi ...@@ -3620,7 +3634,7 @@ public class MiscPayAutoPrc extends ProcessEJB implements MiscPayAutoPrcLocal,Mi
} }
if("WSR".equalsIgnoreCase(compType)) if("WSR".equalsIgnoreCase(compType))
{ {
conn.commit(); conn.commit();
} }
else else
{ {
......
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