Commit 9ba70feb authored by manohar's avatar manohar

If rate > invoice rate, checking added whether average rate < rate if so give error


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@34858 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 378e441f
...@@ -6135,11 +6135,23 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales ...@@ -6135,11 +6135,23 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales
lcRate = getReqDecimal(lcRate, 4); lcRate = getReqDecimal(lcRate, 4);
if ( lcRate > lcInvRate && lcInvRate > 0 ) if ( lcRate > lcInvRate && lcInvRate > 0 )
{ {
errCode = "VTINVRATE1"; // 18/10/14 manoharan take care if specific lot rate < average rate
//errString = getErrorString( childNodeName, errCode, userId ); StringBuffer minRateBuff = getMinRate( dom, dom1, "lot_no", valueXmlString, conn);
//break; System.out.println( "minRateBuff2 :: " + minRateBuff.toString() );
errList.add( errCode ); //valueXmlString = minRateBuff;
errFields.add( childNodeName.toLowerCase() );
String rateValStr = getTagValue( minRateBuff.toString(), "rate" );
System.out.println("manohar lcRateStr [" + lcRateStr + "] lcRate [" + lcRate + "] > lcInvRate [" + lcInvRate + "] avgRate [" + rateValStr + "]");
double avgRate = getRequiredDecimal( Double.parseDouble( getNumString( rateValStr ) ), 4 );
if (avgRate < lcRate)
{
errCode = "VTINVRATE1";
//errString = getErrorString( childNodeName, errCode, userId );
//break;
errList.add( errCode );
errFields.add( childNodeName.toLowerCase() );
}
// end 18/10/14 manoharan take care if specific lot rate < average rate
} }
}//if isnull(ls_invoice_id) or len(trim(ls_invoice_id)) = 0 }//if isnull(ls_invoice_id) or len(trim(ls_invoice_id)) = 0
}//if lc_rate < 0 }//if lc_rate < 0
......
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