lib/taskjuggler/TimeSheets.rb in taskjuggler-3.7.1 vs lib/taskjuggler/TimeSheets.rb in taskjuggler-3.7.2
- old
+ new
@@ -323,12 +323,13 @@
# Compute the total number of potential working time slots during the
# report period. This value is not resource specific.
def totalGrossWorkingSlots
project = @resource.project
# Calculate the number of weeks in the report
- weeksToReport = (@interval.end - @interval.start) / (60 * 60 * 24 * 7)
+ weeksToReport = (@interval.end - @interval.start).to_f /
+ (60 * 60 * 24 * 7)
- daysToSlots(project.weeklyWorkingDays * weeksToReport)
+ daysToSlots((project.weeklyWorkingDays * weeksToReport).to_i)
end
# Compute the total number of actual working time slots of the
# Resource. This is the sum of allocated, free time slots.
def totalNetWorkingSlots