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;
import ibase.webitm.ejb.sys.UtilMethods;
import ibase.webitm.utility.ITMException;
@Stateless // added for ejb3
public class MiscPayAutoPrc extends ProcessEJB implements MiscPayAutoPrcLocal,MiscPayAutoPrcRemote //SessionBean
......@@ -1206,37 +1207,45 @@ public class MiscPayAutoPrc extends ProcessEJB implements MiscPayAutoPrcLocal,Mi
String temp = genericUtility.getColumnValueFromNode("pay_amt", parentNode1);
mPayAmt = temp!= null && temp.trim().length()>0 ?Double.parseDouble(temp):0.0;
mChequeNo = genericUtility.getColumnValueFromNode("cheque_no", parentNode1);
//System.out.println("mpayamt"+mPayAmt+"\nnetpayable"+netPayable+"\ntotUnconfAmt"+totUnconfAmt);
//Modified by Anjali R. on [27/08/2018][Start]
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+")";
//Modified by Anjali R. on[]
//errString = getErrorXML("PAYMENT NOT GENERATED", errStr, "VTPAYANTZR", "", "E");
errString = getErrorMessage("PAYMENT NOT GENERATED", errStr, "VTPAYANTZR", "", "E");
return errString;
//errString = getErrorMessage("PAYMENT NOT GENERATED", errStr, "VTPAYANTZR", "", "E");
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))
{
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 = getErrorMessage("PAYMENT NOT GENERATED", errStr, "VTPAYANTZR", "", "E");
return errString;
//errString = getErrorMessage("PAYMENT NOT GENERATED", errStr, "VTPAYANTZR", "", "E");
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) )
{
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 = getErrorMessage("PAYMENT NOT GENERATED", errStr, "VTPAYANTZR", "", "E");
return errString;
//errString = getErrorMessage("PAYMENT NOT GENERATED", errStr, "VTPAYANTZR", "", "E");
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)
{
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;
//errString = getErrorXML("PAYMENT NOT GENERATED", errStr, "VTPAYANTZR", "", "E");
errString = getErrorMessage("PAYMENT NOT GENERATED", errStr, "VTPAYANTZR", "", "E");
return errString;
//errString = getErrorMessage("PAYMENT NOT GENERATED", errStr, "VTPAYANTZR", "", "E");
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]
//Added by Varsha V on 25-06-18
......@@ -1999,7 +2008,8 @@ public class MiscPayAutoPrc extends ProcessEJB implements MiscPayAutoPrcLocal,Mi
}
confirmRetString = "";
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 = succesString + errorString;*/
......@@ -2181,6 +2191,7 @@ public class MiscPayAutoPrc extends ProcessEJB implements MiscPayAutoPrcLocal,Mi
int count=0;//added by nandkumar gadkari on 15/10/19
boolean sundryM=false;//added by nandkumar gadkari on 15/10/19
String sundryCodeM="";
String errMsg="";
try
{
genericUtility = new E12GenericUtility();
......@@ -3525,7 +3536,8 @@ public class MiscPayAutoPrc extends ProcessEJB implements MiscPayAutoPrcLocal,Mi
confirmRetString = succesString+"</br>" + errorString;
//Modified by Anjali R. on [25/02/2019][Start]
//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]
}
/*confirmRetString = "";
......@@ -3541,6 +3553,7 @@ public class MiscPayAutoPrc extends ProcessEJB implements MiscPayAutoPrcLocal,Mi
}
alreadyExist.clear();
}
errMsg=utilMethods.getMsg("", "VTTRANCONF",conn); //added by manish mhatre on 7-feb-2019
}
catch(Exception e )
{
......@@ -3582,7 +3595,8 @@ public class MiscPayAutoPrc extends ProcessEJB implements MiscPayAutoPrcLocal,Mi
}
//Modified by Anjali R. on [25/02/2019][Start]
//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]
}
private String confirm(String tranId ,String xtraParams ,Connection conn) throws ITMException, Exception
......
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