Commit 4d24099d authored by mjadhav's avatar mjadhav

Error msg shown in front end(GEN_RECEIPT_WIZ)


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@98533 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 2108b45b
......@@ -1822,6 +1822,11 @@ public class ReceiptAdv extends ValidatorEJB implements ReceiptAdvLocal, Receipt
for (cnt = 0; cnt < errListSize; cnt++)
{
errCode = (String)errList.get(cnt);
System.out.println("errCode :"+errCode);
int pos = errCode.indexOf("~");
System.out.println("pos :"+pos);
errCode=errCode.substring(0,pos);
System.out.println("error code is :"+errCode);
errFldName = (String)errFields.get(cnt);
System.out.println(" cnt [" + cnt + "] errCode [" + errCode + "] errFldName [" + errFldName + "]");
errString = getErrorString(errFldName, errCode, userId);
......
......@@ -76,13 +76,14 @@ public class ReceiptAdvPostSave extends ValidatorEJB implements ReceiptAdvPostSa
String acctFinS = "";
String bdFluctuationCf="";
String sql1 ="";
String errorString="";
double rcpAmt=0,finChg=0, diffAmtExchDet = 0, diffAmtExchAdv = 0, diffAmtExchEpc = 0, newAdvAmt = 0;
double billAmtDet = 0, advAmtHdr = 0, adjAmtAdv = 0, bdAmt =0, advAmtRact = 0, othAmt = 0.0,exchRateHdr = 0.0, taxAmt = 0,amount = 0.0,othAmttemp =0.0;
int cnt=0;
try
{
ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB();
GenericUtility genericUtility = GenericUtility.getInstance();
dom = genericUtility.parseString(domString);
......@@ -286,9 +287,13 @@ public class ReceiptAdvPostSave extends ValidatorEJB implements ReceiptAdvPostSa
rs = null;
pstmt.close();
pstmt = null;
System.out.println("newAdvAmt: "+newAdvAmt);
if (newAdvAmt < 0 )
{
throw new Exception("Advance amount calculated is becoming negative [" + newAdvAmt + "]" );
errorString=itmDBAccessEJB.getErrorString("","VTNEGADV","","",conn);
System.out.println("errorString :"+errorString);
//throw new Exception("Advance amount calculated is becoming negative [" + newAdvAmt + "]" );
}
// end 29/05/14 manoharan
......@@ -426,7 +431,7 @@ public class ReceiptAdvPostSave extends ValidatorEJB implements ReceiptAdvPostSa
}
}
System.out.println("Out DcdetPostSaveEJB ... ");
return "";
return errorString;
}
private java.math.BigDecimal round(int scale ,double round)
{
......
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