ItEr60S04ValidacionEProbasFuncionaisItEr59S04 : [Bug #545] Fix bug.

it shows the field name in the hour type column in the report.
This commit is contained in:
Susana Montes Pedreira 2010-07-09 14:33:52 +02:00 committed by Javier Moran Rua
parent 03a7eab29c
commit 0686dcc824
2 changed files with 15 additions and 4 deletions

View file

@ -140,16 +140,16 @@ public class OrderDAO extends IntegrationEntityDAO<Order> implements
// Attach ordername value
each.setOrderName(order.getName());
// Attach calculated pricePerHour
BigDecimal pricePerHour = CostCategoryDAO
.getPriceByResourceDateAndHourType(each.getWorker(),
new LocalDate(each.getDate()), each
.getHoursType());
.getHoursTypeCode());
if (pricePerHour == null) {
for (TypeOfWorkHours defaultprice : typeOfWorkHoursDAO
.list(TypeOfWorkHours.class)) {
if (defaultprice.getCode().equals(each.getHoursType())) {
if (defaultprice.getCode().equals(
each.getHoursTypeCode())) {
pricePerHour = defaultprice.getDefaultPrice();
}
}

View file

@ -52,6 +52,8 @@ public class OrderCostsPerResourceDTO implements
private String hoursType;
private String hoursTypeCode;
// Attached outside the DTO
private BigDecimal cost;
@ -75,7 +77,8 @@ public class OrderCostsPerResourceDTO implements
this.numHours = workReportLine.getNumHours();
this.descriptionValues = descriptionValuesAsString(workReportLine.getDescriptionValues());
this.labels = labelsAsString(workReportLine.getLabels());
this.hoursType = workReportLine.getTypeOfWorkHours().getCode();
this.hoursType = workReportLine.getTypeOfWorkHours().getName();
this.hoursTypeCode = workReportLine.getTypeOfWorkHours().getCode();
this.orderElement = workReportLine.getOrderElement();
this.orderElementCode = workReportLine.getOrderElement().getCode();
this.worker = worker;
@ -215,4 +218,12 @@ public class OrderCostsPerResourceDTO implements
+ o.getOrderElementCode());
}
public void setHoursTypeCode(String hoursTypeCode) {
this.hoursTypeCode = hoursTypeCode;
}
public String getHoursTypeCode() {
return hoursTypeCode;
}
}