Files
redmine_qbo/app/views/invoices/_list.html.erb
2026-02-08 19:45:58 -05:00

28 lines
877 B
Plaintext

<% unless invoices.empty? %>
<%= form_with(url: invoice_path, method: :get) do |form| %>
<% if invoices.count > 1 %>
<div class="form-check">
<%= check_box_tag "select-all-invoices", "1", false, id: "select-all-invoices" %>
<%= label_tag "select-all-invoices", t(:label_select_all) %>
</div>
<hr>
<% end %>
<% invoices.sort.reverse.each do |invoice| %>
<div class="row">
<%= check_box_tag "invoice_ids[]", invoice.id, false, onchange: "updateLink()", class: "invoice-checkbox" if invoices.count > 1 %>
<b><%= link_to "##{invoice.doc_number}", invoice_path(invoice), target: :_blank %></b> <%= invoice.txn_date %>
</div>
<% end %>
<% if invoices.count > 1 %>
<%= form.submit t(:button_bulk_pdf) %>
<% end %>
<% end %>
<% else %>
<p><%=t(:label_no_invoices)%>.</p>
<% end %>