svn commit: r729889 - in /ofbiz/trunk/specialpurpose/projectmgr: webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.groovy widget/forms/TimeSheetForms.xml

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

svn commit: r729889 - in /ofbiz/trunk/specialpurpose/projectmgr: webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.groovy widget/forms/TimeSheetForms.xml

hansbak-2
Author: hansbak
Date: Mon Dec 29 04:45:21 2008
New Revision: 729889

URL: http://svn.apache.org/viewvc?rev=729889&view=rev
Log:
adjustment because of changed uel syntax

Modified:
    ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.groovy
    ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TimeSheetForms.xml

Modified: ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.groovy?rev=729889&r1=729888&r2=729889&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.groovy (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.groovy Mon Dec 29 04:45:21 2008
@@ -130,16 +130,16 @@
             retrieveWorkEffortData();
         }
     if (timeEntry.hours) {
-        dayNumber = (timeEntry.fromDate.getTime() - timesheet.fromDate.getTime()) / (24*60*60*1000);
+        dayNumber = "d" + (timeEntry.fromDate.getTime() - timesheet.fromDate.getTime()) / (24*60*60*1000);
         hours = timeEntry.hours.doubleValue();
         entry.put(String.valueOf(dayNumber), hours);
-        if (dayNumber == 0) day0Total += hours;
-        if (dayNumber == 1) day1Total += hours;
-        if (dayNumber == 2) day2Total += hours;
-        if (dayNumber == 3) day3Total += hours;
-        if (dayNumber == 4) day4Total += hours;
-        if (dayNumber == 5) day5Total += hours;
-        if (dayNumber == 6) day6Total += hours;
+        if (dayNumber.equals("d0")) day0Total += hours;
+        if (dayNumber.equals("d1")) day1Total += hours;
+        if (dayNumber.equals("d2")) day2Total += hours;
+        if (dayNumber.equals("d3")) day3Total += hours;
+        if (dayNumber.equals("d4")) day4Total += hours;
+        if (dayNumber.equals("d5")) day5Total += hours;
+        if (dayNumber.equals("d6")) day6Total += hours;
         taskTotal += hours;
     }
     entry.rateTypeId = timeEntry.rateTypeId;
@@ -160,13 +160,13 @@
 // add the totals line if at least one entry
 if (timeEntry) {
     entry = ["timesheetId" : timesheet.timesheetId];
-    entry."0" = day0Total;
-    entry."1" = day1Total;
-    entry."2" = day2Total;
-    entry."3" = day3Total;
-    entry."4" = day4Total;
-    entry."5" = day5Total;
-    entry."6" = day6Total;
+    entry.d0 = day0Total;
+    entry.d1 = day1Total;
+    entry.d2 = day2Total;
+    entry.d3 = day3Total;
+    entry.d4 = day4Total;
+    entry.d5 = day5Total;
+    entry.d6 = day6Total;
     entry.phaseName = "Totals";
     entry.workEffortId = "Totals";
     entry.total = day0Total + day1Total + day2Total + day3Total + day4Total + day5Total + day6Total;

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TimeSheetForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TimeSheetForms.xml?rev=729889&r1=729888&r2=729889&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TimeSheetForms.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TimeSheetForms.xml Mon Dec 29 04:45:21 2008
@@ -48,13 +48,13 @@
                 <entity-options entity-name="RateType" description="${description}"/>
             </drop-down>
         </field>
-        <field name="0" parameter-name="hoursDay0" title="${uiLabelMap.ProjectMgrSun}"><text size="5"/></field>
-        <field name="1" parameter-name="hoursDay1" title="${uiLabelMap.ProjectMgrMon}"><text size="5"/></field>
-        <field name="2" parameter-name="hoursDay2" title="${uiLabelMap.ProjectMgrTue}"><text size="5"/></field>
-        <field name="3" parameter-name="hoursDay3" title="${uiLabelMap.ProjectMgrWen}"><text size="5"/></field>
-        <field name="4" parameter-name="hoursDay4" title="${uiLabelMap.ProjectMgrThu}"><text size="5"/></field>
-        <field name="5" parameter-name="hoursDay5" title="${uiLabelMap.ProjectMgrFri}"><text size="5"/></field>
-        <field name="6" parameter-name="hoursDay6" title="${uiLabelMap.ProjectMgrSat}"><text size="5"/></field>
+        <field name="d0" parameter-name="hoursDay0" title="${uiLabelMap.ProjectMgrSun}"><text size="5"/></field>
+        <field name="d1" parameter-name="hoursDay1" title="${uiLabelMap.ProjectMgrMon}"><text size="5"/></field>
+        <field name="d2" parameter-name="hoursDay2" title="${uiLabelMap.ProjectMgrTue}"><text size="5"/></field>
+        <field name="d3" parameter-name="hoursDay3" title="${uiLabelMap.ProjectMgrWen}"><text size="5"/></field>
+        <field name="d4" parameter-name="hoursDay4" title="${uiLabelMap.ProjectMgrThu}"><text size="5"/></field>
+        <field name="d5" parameter-name="hoursDay5" title="${uiLabelMap.ProjectMgrFri}"><text size="5"/></field>
+        <field name="d6" parameter-name="hoursDay6" title="${uiLabelMap.ProjectMgrSat}"><text size="5"/></field>
         <field name="total" title="${uiLabelMap.ProjectMgrActualTotal}"><display/></field>
         <field name="plannedHours" title="${uiLabelMap.ProjectMgrPlanHours}"><display/></field>
         <field name="updateButton"><submit button-type="button"/></field>