Show only active tasks in the invoice select form

If there are tasks with an hourly rate that have no time entries,
then it's not worth showing them.
This commit is contained in:
Paul van Tilburg 2014-11-01 22:08:14 +01:00
parent 46aca92887
commit 68c6a337a1
1 changed files with 1 additions and 1 deletions

View File

@ -1426,7 +1426,7 @@ module StopTime::Controllers
@customer = Customer.find(customer_id)
@hourly_rate_tasks = {}
@fixed_cost_tasks = {}
@customer.unbilled_tasks.each do |task|
@customer.active_tasks.each do |task|
case task.type
when "fixed_cost"
total = task.time_entries.inject(0.0) { |s, te| s + te.hours_total }