Author: erwan
Date: Thu Mar 3 07:22:50 2011
New Revision: 1076546
URL: http://svn.apache.org/viewvc?rev=1076546&view=rev
Log:
tabs to spaces and some reindentation in Various.java
Modified:
ofbiz/trunk/specialpurpose/projectmgr/src/org/ofbiz/project/Various.java
Modified:
ofbiz/trunk/specialpurpose/projectmgr/src/org/ofbiz/project/Various.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/src/org/ofbiz/project/Various.java?rev=1076546&r1=1076545&r2=1076546&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/src/org/ofbiz/project/Various.java
(original)
+++ ofbiz/trunk/specialpurpose/projectmgr/src/org/ofbiz/project/Various.java
Thu Mar 3 07:22:50 2011
@@ -38,14 +38,14 @@ public class Various {
try {
List<GenericValue> assocs = task.getRelated("FromWorkEffortAssoc");
if (UtilValidate.isNotEmpty(assocs)) {
- for (GenericValue assoc : assocs) {
+ for (GenericValue assoc : assocs) {
GenericValue nextTask =
assoc.getRelatedOne("ToWorkEffort");
- Timestamp newStartDate =
task.getTimestamp("estimatedCompletionDate"); // start of next task the next day
- if (nextTask.get("estimatedStartDate") == null ||
nextTask.getTimestamp("estimatedStartDate").before(newStartDate)) {
- nextTask.put("estimatedStartDate",
UtilDateTime.addDaysToTimestamp(task.getTimestamp("estimatedCompletionDate"),
1)); // start of next task the next day
- nextTask.put("estimatedCompletionDate",
calculateCompletionDate(nextTask,
task.getTimestamp("estimatedCompletionDate")));
- nextTask.store();
- }
+ Timestamp newStartDate =
task.getTimestamp("estimatedCompletionDate"); // start of next task the next day
+ if (nextTask.get("estimatedStartDate") == null ||
nextTask.getTimestamp("estimatedStartDate").before(newStartDate)) {
+ nextTask.put("estimatedStartDate",
UtilDateTime.addDaysToTimestamp(task.getTimestamp("estimatedCompletionDate"),
1)); // start of next task the next day
+ nextTask.put("estimatedCompletionDate",
calculateCompletionDate(nextTask,
task.getTimestamp("estimatedCompletionDate")));
+ nextTask.store();
+ }
setDatesFollowingTasks(nextTask);
}
}
@@ -92,12 +92,12 @@ public class Various {
double actualHours = 0.00;
if (timesheetId != null) {
try {
- List<GenericValue> actuals = delegator.findByAnd("TimeEntry",
UtilMisc.toMap("timesheetId", timesheetId));
+ List<GenericValue> actuals = delegator.findByAnd("TimeEntry",
UtilMisc.toMap("timesheetId", timesheetId));
if (actuals.size() > 0) {
- for (GenericValue actual : actuals) {
- Double hour = (Double) actual.get("hours");
- double hours = hour.doubleValue();
- actualHours = actualHours + hours;
+ for (GenericValue actual : actuals) {
+ Double hour = (Double) actual.get("hours");
+ double hours = hour.doubleValue();
+ actualHours = actualHours + hours;
}
}
} catch (GenericEntityException e) {