Commit 12595a13 authored by smestry's avatar smestry

W15ESUN005, Changed by Sneha. Updated the JSP for Location Stock Occupancy dashboard.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@98597 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 4240d74e
......@@ -89,7 +89,14 @@ public class InventoryOccupancy extends ValidatorEJB implements InventoryOccupan
rs.close();
rs = null;
}
percentage = (((double)used / (double)total) * 100) ;
if (total == 0)
{
percentage = 0;
}else{
percentage = (((double)used / (double)total) * 100);
}
rowData = new JSONObject();
rowData.put("descr", "Overall");
......@@ -139,7 +146,14 @@ public class InventoryOccupancy extends ValidatorEJB implements InventoryOccupan
rs.close();
rs = null;
}
percentageDso = (((double)usedDso / (double)totalDso) * 100) ;
if (totalDso == 0)
{
percentage = 0;
}else{
percentageDso = (((double)usedDso / (double)totalDso) * 100);
}
rowData = new JSONObject();
rowData.put("descr", "DSO");
......@@ -189,7 +203,14 @@ public class InventoryOccupancy extends ValidatorEJB implements InventoryOccupan
rs.close();
rs = null;
}
percentagePso = (((double)usedPso / (double)totalPso) * 100) ;
if (totalPso == 0)
{
percentage = 0;
}else{
percentagePso = (((double)usedPso / (double)totalPso) * 100);
}
rowData = new JSONObject();
rowData.put("descr", "PSO");
......@@ -240,7 +261,14 @@ public class InventoryOccupancy extends ValidatorEJB implements InventoryOccupan
rs.close();
rs = null;
}
if (totalCaspk == 0)
{
percentage = 0;
}else{
percentageCaspk = (((double)usedCaspk / (double)totalCaspk) * 100) ;
}
rowData = new JSONObject();
rowData.put("descr", "Case Pick");
......@@ -290,7 +318,14 @@ public class InventoryOccupancy extends ValidatorEJB implements InventoryOccupan
rs.close();
rs = null;
}
percentageActpk = (((double)usedActpk / (double)totalActpk) * 100) ;
if (totalActpk == 0)
{
percentage = 0;
}else{
percentageActpk = (((double)usedActpk / (double)totalActpk) * 100);
}
rowData = new JSONObject();
rowData.put("descr", "Active Pick");
......
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