mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-11-18 02:20:37 -05:00
A new invoice lists the customer's open issues (any project, those the user can see) in a warning under the title, so work orders aren't left open once the work is billed. It's there when the page opens with a customer (from the customer page or an estimate) and follows the customer when it's changed: customer_info returns open_issues_html for invoices. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
18 lines
629 B
ERB
18 lines
629 B
ERB
<%# 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 : []
|
|
%>
|
|
<div id="qbo-open-issues">
|
|
<% if issues.any? %>
|
|
<div class="warning qbo-estimate-notice">
|
|
<%= l(:text_invoice_customer_open_issues, count: issues.size) %>
|
|
<ul>
|
|
<% issues.each do |issue| %>
|
|
<li><%= link_to_issue(issue, truncate: 60) %> (<%= issue.status %>)</li>
|
|
<% end %>
|
|
</ul>
|
|
</div>
|
|
<% end %>
|
|
</div>
|