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 ...@@ -89,7 +89,14 @@ public class InventoryOccupancy extends ValidatorEJB implements InventoryOccupan
rs.close(); rs.close();
rs = null; rs = null;
} }
percentage = (((double)used / (double)total) * 100) ;
if (total == 0)
{
percentage = 0;
}else{
percentage = (((double)used / (double)total) * 100);
}
rowData = new JSONObject(); rowData = new JSONObject();
rowData.put("descr", "Overall"); rowData.put("descr", "Overall");
...@@ -139,7 +146,14 @@ public class InventoryOccupancy extends ValidatorEJB implements InventoryOccupan ...@@ -139,7 +146,14 @@ public class InventoryOccupancy extends ValidatorEJB implements InventoryOccupan
rs.close(); rs.close();
rs = null; rs = null;
} }
percentageDso = (((double)usedDso / (double)totalDso) * 100) ;
if (totalDso == 0)
{
percentage = 0;
}else{
percentageDso = (((double)usedDso / (double)totalDso) * 100);
}
rowData = new JSONObject(); rowData = new JSONObject();
rowData.put("descr", "DSO"); rowData.put("descr", "DSO");
...@@ -189,7 +203,14 @@ public class InventoryOccupancy extends ValidatorEJB implements InventoryOccupan ...@@ -189,7 +203,14 @@ public class InventoryOccupancy extends ValidatorEJB implements InventoryOccupan
rs.close(); rs.close();
rs = null; rs = null;
} }
percentagePso = (((double)usedPso / (double)totalPso) * 100) ;
if (totalPso == 0)
{
percentage = 0;
}else{
percentagePso = (((double)usedPso / (double)totalPso) * 100);
}
rowData = new JSONObject(); rowData = new JSONObject();
rowData.put("descr", "PSO"); rowData.put("descr", "PSO");
...@@ -240,7 +261,14 @@ public class InventoryOccupancy extends ValidatorEJB implements InventoryOccupan ...@@ -240,7 +261,14 @@ public class InventoryOccupancy extends ValidatorEJB implements InventoryOccupan
rs.close(); rs.close();
rs = null; rs = null;
} }
if (totalCaspk == 0)
{
percentage = 0;
}else{
percentageCaspk = (((double)usedCaspk / (double)totalCaspk) * 100) ; percentageCaspk = (((double)usedCaspk / (double)totalCaspk) * 100) ;
}
rowData = new JSONObject(); rowData = new JSONObject();
rowData.put("descr", "Case Pick"); rowData.put("descr", "Case Pick");
...@@ -290,7 +318,14 @@ public class InventoryOccupancy extends ValidatorEJB implements InventoryOccupan ...@@ -290,7 +318,14 @@ public class InventoryOccupancy extends ValidatorEJB implements InventoryOccupan
rs.close(); rs.close();
rs = null; rs = null;
} }
percentageActpk = (((double)usedActpk / (double)totalActpk) * 100) ;
if (totalActpk == 0)
{
percentage = 0;
}else{
percentageActpk = (((double)usedActpk / (double)totalActpk) * 100);
}
rowData = new JSONObject(); rowData = new JSONObject();
rowData.put("descr", "Active Pick"); 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