%# A new invoice's customer still has open issues (work orders), so they're not left behind once billed. Replaced when the customer is changed (customer_info's open_issues_html). %> <% issues = customer ? customer.issues.open.visible.order(id: :desc).to_a : [] %>