Fix fixed cost tasks being grouped under random projects in customer view

This commit is contained in:
Paul van Tilburg 2014-02-07 20:30:38 +01:00
parent 0f7c731124
commit 70c0ad4a54
1 changed files with 5 additions and 3 deletions

View File

@ -817,9 +817,11 @@ module StopTime::Controllers
cur_active_task = nil
@tasks.each do |task|
if task.billed?
if cur_active_task.nil?
# Apparently there is no active task anymore, probably
# it was a fixed-cost task
if cur_active_task.nil? or
task.name != cur_active_task.name
# Apparently, this is billed but it does not belong to the
# current active task, so probably it was a fixed-cost task
cur_active_task = task
@billed_tasks[task] = [task]
else
@billed_tasks[cur_active_task] << task