From 68c6a337a1d613d3471cb6d1c89d3d896f58b872 Mon Sep 17 00:00:00 2001 From: Paul van Tilburg Date: Sat, 1 Nov 2014 22:08:14 +0100 Subject: [PATCH] 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. --- stoptime.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stoptime.rb b/stoptime.rb index a4b0459..b9f1b99 100644 --- a/stoptime.rb +++ b/stoptime.rb @@ -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 }