Only show unbilled time in the customer form

Done so that it is the same as in the task form.
Also the list of all time entries for a customer can be very long,
thus creating a long load time of the customer form.
This commit is contained in:
Paul van Tilburg 2015-07-11 21:20:11 +02:00
parent 43b9c1336f
commit 4eef4669a5

View file

@ -1025,7 +1025,8 @@ module StopTime::Controllers
@time_entries = @customer.time_entries.order("start DESC")
@time_entries = @customer.time_entries.order("start DESC")\
.reject { |te| te.task.billed? }
@invoices = @customer.invoices
@invoices.each do |i|
@input["paid_#{i.number}"] = true if i.paid?