Bug #1505: Fix division by zero calculating margin with deadline

The margin with deadline is divided by the order length in days. If the order
starts and finish in the same day that length was been counted as 0 when it is
really 1.

FEA: ItEr76S04BugFixing
This commit is contained in:
Manuel Rego Casasnovas 2012-07-13 09:15:10 +02:00
parent ba2dacedb4
commit cd7dc48962

View file

@ -223,7 +223,7 @@ public class DashboardModel implements IDashboardModel {
}
TaskGroup rootTask = getRootTask();
Days orderDuration = Days.daysBetween(rootTask.getStartAsLocalDate(),
rootTask.getEndAsLocalDate());
rootTask.getEndAsLocalDate().plusDays(1));
LocalDate deadLineAsLocalDate = LocalDate.fromDateFields(currentOrder
.getDeadline());