Also order unbilled tasks descending by date in the time_entries view

This commit is contained in:
Paul van Tilburg 2013-06-22 12:58:23 +02:00
parent dc9aaca602
commit 167c8d1b99
1 changed files with 3 additions and 1 deletions

View File

@ -1185,7 +1185,9 @@ module StopTime::Controllers
if @input["show"] == "all"
@time_entries = TimeEntry.all(:order => "start DESC")
else
@time_entries = TimeEntry.joins(:task).where("stoptime_tasks.invoice_id" => nil)
@time_entries = TimeEntry.joins(:task)\
.where("stoptime_tasks.invoice_id" => nil)\
.order("start DESC")
end
@time_entries.each do |te|
@input["bill_#{te.id}"] = true if te.bill?