Commit e70c0135 authored by kmandhre's avatar kmandhre

sun source merge mail by roahan b ,Issue tracker point no:204


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93219 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 884ef871
...@@ -511,22 +511,28 @@ public class StockAllocIc extends ValidatorEJB implements StockAllocIcLocal, Sto ...@@ -511,22 +511,28 @@ public class StockAllocIc extends ValidatorEJB implements StockAllocIcLocal, Sto
if(rs.next()) if(rs.next())
{ {
double qtyAvilable = 0.0; double qtyAvilable = 0.0;
qtyAvilable = rs.getDouble("QTY_AVAIL_ALLOC"); qtyAvilable = rs.getDouble("QTY_AVAIL_ALLOC");
System.out.println("Calling for item code"+itemCode);
if(Double.parseDouble(quantityDom) > qtyAvilable) if(Double.parseDouble(quantityDom) > qtyAvilable)
{ {
errCode = "VTSTOCK2"; errCode = "VTSTOCK2";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
} }
//Changed by Rohan on 13-06-13 for bug fixing of quantity not greater than pending quantity.start
/*
else if(validateAllDetailQty(saleOrder, lineNoSord, dom2, conn)) else if(validateAllDetailQty(saleOrder, lineNoSord, dom2, conn))
{ {
errCode = "INVQUANTY"; errCode = "INVQUANTY";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
} }
*/
//Changed by Rohan on 13-06-13 for bug fixing of quantity not greater than pending quantity.start
} }
} }
System.out.println("quantityDom"+quantityDom+"pendingQtyDom"+pendingQtyDom);
if ( pendingQtyDom == null || pendingQtyDom.trim().length() == 0 ) if ( pendingQtyDom == null || pendingQtyDom.trim().length() == 0 )
{ {
pendingQtyDom = "0"; pendingQtyDom = "0";
...@@ -1441,7 +1447,9 @@ public class StockAllocIc extends ValidatorEJB implements StockAllocIcLocal, Sto ...@@ -1441,7 +1447,9 @@ public class StockAllocIc extends ValidatorEJB implements StockAllocIcLocal, Sto
return dataVolumeMap; return dataVolumeMap;
} }
//Changed by Rohan on 13-06-13 for bug fixing of quantity not greater than pending quantity.start
//Changed by sumit on 21/12/12 quantity checking in all present deatil start. //Changed by sumit on 21/12/12 quantity checking in all present deatil start.
/*
private boolean validateAllDetailQty(String saleOrder, String lineNoSord, Document allDom, Connection conn) throws ITMException private boolean validateAllDetailQty(String saleOrder, String lineNoSord, Document allDom, Connection conn) throws ITMException
{ {
double quantity = 0.0, qtyavil = 0.0; double quantity = 0.0, qtyavil = 0.0;
...@@ -1470,7 +1478,7 @@ public class StockAllocIc extends ValidatorEJB implements StockAllocIcLocal, Sto ...@@ -1470,7 +1478,7 @@ public class StockAllocIc extends ValidatorEJB implements StockAllocIcLocal, Sto
if (childNode.getNodeType() == childNode.ELEMENT_NODE) if (childNode.getNodeType() == childNode.ELEMENT_NODE)
{ {
childNodeName = childNode.getNodeName(); childNodeName = childNode.getNodeName();
System.out.println("childNodeNamechildNodeName ** ["+childNodeName+"]"); System.out.println("childNodeNamechildNodeName ** ["+childNodeName+"]"+"saleOrder"+saleOrder+"lineNoSord"+lineNoSord);
if ( "attribute".equalsIgnoreCase( childNodeName ) ) if ( "attribute".equalsIgnoreCase( childNodeName ) )
{ {
//System.out.println(" natribute "); //System.out.println(" natribute ");
...@@ -1483,7 +1491,9 @@ public class StockAllocIc extends ValidatorEJB implements StockAllocIcLocal, Sto ...@@ -1483,7 +1491,9 @@ public class StockAllocIc extends ValidatorEJB implements StockAllocIcLocal, Sto
if ("quantity".equalsIgnoreCase(childNodeName)) if ("quantity".equalsIgnoreCase(childNodeName))
{ {
//arryList.add(childNode.getFirstChild().getNodeValue().trim()); //arryList.add(childNode.getFirstChild().getNodeValue().trim());
quantity = quantity + Double.parseDouble(childNode.getFirstChild().getNodeValue()); System.out.println("Quantity before"+quantity);
quantity = quantity + Double.parseDouble(childNode.getFirstChild().getNodeValue());
System.out.println("Quantity Afetre"+quantity);
} }
} }
...@@ -1519,7 +1529,9 @@ public class StockAllocIc extends ValidatorEJB implements StockAllocIcLocal, Sto ...@@ -1519,7 +1529,9 @@ public class StockAllocIc extends ValidatorEJB implements StockAllocIcLocal, Sto
return result; return result;
} }
//Changed by sumit on 21/12/12 quantity checking in all present deatil end. //Changed by sumit on 21/12/12 quantity checking in all present deatil end.
*
*/
//Changed by Rohan on 13-06-13 for bug fixing of quantity not greater than pending quantity.end
//Changed by sumit on 07/03/13 getting value after sale order and line_no_sord start //Changed by sumit on 07/03/13 getting value after sale order and line_no_sord start
private Map getStockDetail(String siteCode, String saleOrder, String lineNoSord, Connection conn, String itemCode) throws ITMException private Map getStockDetail(String siteCode, String saleOrder, String lineNoSord, Connection conn, String itemCode) throws ITMException
{ {
......
...@@ -94,6 +94,8 @@ public class StockAllocPrc extends ActionHandlerEJB implements StockAllocPrcLoca ...@@ -94,6 +94,8 @@ public class StockAllocPrc extends ActionHandlerEJB implements StockAllocPrcLoca
pstmt1.clearParameters(); pstmt1.clearParameters();
System.out.println("["+rs.getDouble(3)+"] SUM(QUANTITY) in sord_alloc_det and avilqty ["+availQty+"]"); System.out.println("["+rs.getDouble(3)+"] SUM(QUANTITY) in sord_alloc_det and avilqty ["+availQty+"]");
//Changed by Rohan on 13-06-13 for updating sorditem after checking validation.start
/*
if( rs.getDouble(3) <= availQty ) if( rs.getDouble(3) <= availQty )
{ {
errString = this.sorderAllocate(tranId,xtraParams,conn); errString = this.sorderAllocate(tranId,xtraParams,conn);
...@@ -103,7 +105,16 @@ public class StockAllocPrc extends ActionHandlerEJB implements StockAllocPrcLoca ...@@ -103,7 +105,16 @@ public class StockAllocPrc extends ActionHandlerEJB implements StockAllocPrcLoca
errString = itmDBAccessEJB.getErrorString("","INVQUANTY",""); errString = itmDBAccessEJB.getErrorString("","INVQUANTY","");
return errString; return errString;
} }
*/
if( rs.getDouble(3) > availQty )
{
errString = itmDBAccessEJB.getErrorString("","INVQUANTY","");
return errString;
}
//Changed by Rohan on 13-06-13 for updating sorditem after checking validation.end
} }
if(pstmt1 != null) if(pstmt1 != null)
{ {
pstmt1.close(); pstmt1.close();
...@@ -117,6 +128,13 @@ public class StockAllocPrc extends ActionHandlerEJB implements StockAllocPrcLoca ...@@ -117,6 +128,13 @@ public class StockAllocPrc extends ActionHandlerEJB implements StockAllocPrcLoca
{ {
return errString; return errString;
} }
//Changed by Rohan on 13-06-13 for updating sorditem aftchecking validation.start
else
{
errString = this.sorderAllocate(tranId,xtraParams,conn);
}
//Changed by Rohan on 13-06-13 for updating sorditem aftchecking validation.end
} }
} //end of try } //end of try
......
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