Set the invoices billed flags in the CustomersNInvoices controller

This commit is contained in:
Paul van Tilburg 2012-01-03 17:38:14 +01:00
parent 2dc1e964e4
commit 8e3ebc709a
1 changed files with 5 additions and 2 deletions

View File

@ -845,9 +845,12 @@ module StopTime::Controllers
# _customer_id_ and displays them using Views#invoices.
def get(customer_id)
# FIXME: quick hack! is this URL even used?
@invoices = {}
customer = Customer.find(customer_id)
@invoices[customer.name] = customer.invoices
customer.invoices.each do |i|
@input["paid_#{i.number}"] = true if i.paid?
end
@invoices = {customer.name => customer.invoices}
render :invoices
end