svn commit: r709630 - /ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.groovy

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r709630 - /ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.groovy

hansbak-2
Author: hansbak
Date: Fri Oct 31 20:20:55 2008
New Revision: 709630

URL: http://svn.apache.org/viewvc?rev=709630&view=rev
Log:
round completion in ganttcahrt to a whole percentage

Modified:
    ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.groovy

Modified: ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.groovy?rev=709630&r1=709629&r2=709630&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.groovy (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.groovy Fri Oct 31 20:20:55 2008
@@ -22,6 +22,7 @@
 import org.ofbiz.entity.*;
 import org.ofbiz.base.util.*;
 import org.ofbiz.entity.util.*;
+import java.math.*;
 
 projectId = parameters.projectId;
 userLogin = parameters.userLogin;
@@ -78,7 +79,7 @@
                     taskInfo.completion = 100;
                 }else{
                  if (taskInfo.actualHours) {
-                 taskInfo.completion = taskInfo.actualHours*100/taskInfo.plannedHours;
+                 taskInfo.completion = new BigDecimal(taskInfo.actualHours*100/taskInfo.plannedHours).setScale(0, BigDecimal.ROUND_UP);
                  } else {
                  taskInfo.completion = 0;
                  }