ItEr46S12CUVisualizacionResponsabilidadesTRaballoNaPlanificacion: Calendar#toHours must return zero hours if the availability is zero.

This commit is contained in:
Óscar González Fernández 2010-02-04 12:28:39 +01:00
parent 9faed4290a
commit 6abcf566f9

View file

@ -263,6 +263,9 @@ public class BaseCalendar extends BaseEntity implements IWorkHours {
}
private Integer getWorkableHours(LocalDate date) {
if (!isActive(date)) {
return 0;
}
CalendarException exceptionDay = getExceptionDay(date);
if (exceptionDay != null) {
return exceptionDay.getHours();