Commit 32b7f269 authored by skale's avatar skale

Change in validation for saleRetQty.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@91215 ce508802-f39f-4f6c-b175-0d175dae99d5
parent e75f1514
...@@ -337,7 +337,7 @@ public class ChargeBackLoc extends ValidatorEJB implements ChargeBackLocLocal, C ...@@ -337,7 +337,7 @@ public class ChargeBackLoc extends ValidatorEJB implements ChargeBackLocLocal, C
double unconfQtyDbl = Double.parseDouble(unconfQty); double unconfQtyDbl = Double.parseDouble(unconfQty);
double confQtyDbl = Double.parseDouble(confQty); double confQtyDbl = Double.parseDouble(confQty);
if( qtyDbl > ( saleQtyDbl + saleRetQtyDbl - unconfQtyDbl - confQtyDbl ) ) if( qtyDbl > ( saleQtyDbl - saleRetQtyDbl - unconfQtyDbl - confQtyDbl ) )
{ {
errString =itmDBAccessEJB.getErrorString("quantity","VTINVQUANT",userId); errString =itmDBAccessEJB.getErrorString("quantity","VTINVQUANT",userId);
break ; break ;
...@@ -351,6 +351,20 @@ public class ChargeBackLoc extends ValidatorEJB implements ChargeBackLocLocal, C ...@@ -351,6 +351,20 @@ public class ChargeBackLoc extends ValidatorEJB implements ChargeBackLocLocal, C
errString =itmDBAccessEJB.getErrorString("rate__contr","VTRATCRNUL",userId); errString =itmDBAccessEJB.getErrorString("rate__contr","VTRATCRNUL",userId);
break ; break ;
} }
else
{
String rateSell = genericUtility.getColumnValue( "rate__sell", dom );
String rateContr = childNode.getFirstChild().getNodeValue();
if( rateSell == null )
rateSell = "0";
if( rateContr == null )
rateContr = "0";
if( Double.parseDouble(rateContr) > Double.parseDouble(rateSell) )
{
errString =itmDBAccessEJB.getErrorString("rate__contr","EDCSTRTINV",userId);
break ;
}
}
} }
}//END FOR OF CASE2 }//END FOR OF CASE2
break; break;
...@@ -968,7 +982,7 @@ public class ChargeBackLoc extends ValidatorEJB implements ChargeBackLocLocal, C ...@@ -968,7 +982,7 @@ public class ChargeBackLoc extends ValidatorEJB implements ChargeBackLocLocal, C
pStmt.close(); pStmt.close();
pStmt = null; pStmt = null;
sql = "select sum(case when B.ret_rep_flag = 'R' then -b.quantity else b.quantity end) as saleRetQty " sql = "select sum(case when B.ret_rep_flag = 'R' then b.quantity else -b.quantity end) as saleRetQty "
+" from sreturn a, sreturndet b " +" from sreturn a, sreturndet b "
+" where a.tran_id = b.tran_id " +" where a.tran_id = b.tran_id "
+" and a.cust_code = ? " +" and a.cust_code = ? "
...@@ -1519,7 +1533,7 @@ public class ChargeBackLoc extends ValidatorEJB implements ChargeBackLocLocal, C ...@@ -1519,7 +1533,7 @@ public class ChargeBackLoc extends ValidatorEJB implements ChargeBackLocLocal, C
rs = null; rs = null;
pStmt.close(); pStmt.close();
pStmt = null; pStmt = null;
sql = "select sum(case when B.ret_rep_flag = 'R' then -b.quantity else b.quantity end) as saleRetQty " sql = "select sum(case when B.ret_rep_flag = 'R' then b.quantity else -b.quantity end) as saleRetQty "
+" from sreturn a, sreturndet b " +" from sreturn a, sreturndet b "
+" where a.tran_id = b.tran_id " +" where a.tran_id = b.tran_id "
+" and a.cust_code = ? " +" and a.cust_code = ? "
......
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