Commit 558d1877 authored by sbehera's avatar sbehera

New Validation added for the Account Code if it is not defined in itemser table for the item code.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93450 ce508802-f39f-4f6c-b175-0d175dae99d5
parent b38369c5
......@@ -1535,7 +1535,7 @@ public class InvAcct
double amount=0, rate=0, exchRate=1;
String mcctrCode="", macctCode="", analysis="",analysis1="", analysis2="", analysis3="", stkList="";
int sum=0;
ITMDBAccessEJB itmDBAccess = new ITMDBAccessEJB();
try{
invOnline=distCommon.getDisparams("999999", "INV_ACCT_TRF", conn);
......@@ -1722,13 +1722,24 @@ public class InvAcct
return errString;
}
String temp=finCommon.getAcctDetrTtype(itemCode, " ", "XFRX", tranType, conn);
String[] split=temp.split(",");
String split[]=temp.split(",");
if(split==null || split.length==0){
errString = itmDBAccessEJB.getErrorString("","VTACTCDND","","",conn);
return errString;
}
macctCode=split[0];
mcctrCode=split[1];
if(split.length==2)
mcctrCode=split[1];
combination=macctCode+"@"+mcctrCode;
System.out.println("combination::"+combination);
if(!stkmap.containsKey(combination)){
stkmap.put(combination, amount);
}else{
......@@ -1750,9 +1761,14 @@ public class InvAcct
while(itr.hasNext()){
String key=(String)itr.next();
String[] split1=key.split("@");
macctCode=split1[0];
mcctrCode=split1[1];
String split1[]=key.split("@");
if(split1!=null || split1.length>0)
{
macctCode=split1[0];
if(split1.length==2)
mcctrCode=split1[1];
}
......@@ -1764,7 +1780,7 @@ public class InvAcct
if((macctCode==null)||(macctCode.trim().length()==0))
{
errString = itmDBAccessEJB.getErrorString("","VTSTTRF","","",conn);
errString = itmDBAccessEJB.getErrorString("","VTACTCDND","","",conn);
return errString;
}else{
glTraceMap.put("acct_code", macctCode);
......@@ -1825,6 +1841,12 @@ public class InvAcct
}
errString=finCommon.checkGlTranDrCr(refserFor, tranId, conn);
if(errString != null && errString.trim().length() > 0)
{
errString=itmDBAccess.getErrorString("","VCOINDIFF1","");
return errString;
}
System.out.println("all correct");
}
......
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