ItEr28S05RFControlAvancesIncompatiblesEnUnidadesTraballoItEr27S05: Fixed problem removing the first AdvanceMeasurement created.

This commit is contained in:
Manuel Rego Casasnovas 2009-09-30 18:19:54 +02:00 committed by Javier Moran Rua
parent 98d5fc5aa7
commit 96cc581868
2 changed files with 6 additions and 1 deletions

View file

@ -49,7 +49,9 @@ public class AdvanceMeasurement extends BaseEntity {
public void setValue(BigDecimal value) {
this.value = value;
this.value.setScale(2);
if (value != null) {
this.value.setScale(2);
}
}
public BigDecimal getValue() {

View file

@ -18,6 +18,9 @@ public class AdvanceMeasurementComparator implements Comparator<AdvanceMeasureme
@Override
public int compare(AdvanceMeasurement arg0, AdvanceMeasurement arg1) {
if (arg0.getDate() == arg1.getDate()) {
return 0;
}
if (arg0.getDate() == null) {
return -1;
}