Set the invoices billed flags in the CustomersNInvoices controller
This commit is contained in:
parent
2dc1e964e4
commit
8e3ebc709a
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue