[Bug #884] Show progress measurements list in reverse order.
FEA : ItEr72S04BugFixing
This commit is contained in:
parent
391666c638
commit
7eee8be116
3 changed files with 9 additions and 5 deletions
|
|
@ -42,12 +42,12 @@ public class AdvanceMeasurementComparator implements Comparator<AdvanceMeasureme
|
|||
if (arg0.getDate() == arg1.getDate()) {
|
||||
return 0;
|
||||
}
|
||||
if (arg1.getDate() == null) {
|
||||
if (arg0.getDate() == null) {
|
||||
return -1;
|
||||
}
|
||||
if (arg0.getDate() == null) {
|
||||
if (arg1.getDate() == null) {
|
||||
return 1;
|
||||
}
|
||||
return arg0.getDate().compareTo(arg1.getDate());
|
||||
return arg1.getDate().compareTo(arg0.getDate());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ public class DirectAdvanceAssignment extends AdvanceAssignment {
|
|||
&& (currentAdvance.getDate() != null)
|
||||
&& (nextAdvance.getDate() != null)
|
||||
&& (currentAdvance.getValue().compareTo(
|
||||
nextAdvance.getValue()) > 0)) {
|
||||
nextAdvance.getValue()) < 0)) {
|
||||
return false;
|
||||
}
|
||||
currentAdvance = nextAdvance;
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ package org.navalplanner.web.orders;
|
|||
import static org.navalplanner.web.I18nHelper._;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
|
@ -107,7 +108,10 @@ public class ManageOrderElementAdvancesController extends
|
|||
}
|
||||
|
||||
public List<AdvanceMeasurement> getAdvanceMeasurements() {
|
||||
return manageOrderElementAdvancesModel.getAdvanceMeasurements();
|
||||
List<AdvanceMeasurement> measurements = manageOrderElementAdvancesModel
|
||||
.getAdvanceMeasurements();
|
||||
Collections.reverse(measurements);
|
||||
return measurements;
|
||||
}
|
||||
|
||||
public List<AdvanceAssignment> getAdvanceAssignments() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue