Multiple Invoices to PDF

This commit is contained in:
2026-01-19 19:33:29 -05:00
parent 55d00f9005
commit 704dff2a72
3 changed files with 41 additions and 8 deletions

View File

@@ -1,9 +1,20 @@
<% if @customer.present? %>
<% @customer.invoices.order(id: :desc).each do |invoice| %>
<div class="row">
<b><%= link_to "##{invoice.doc_number}", invoice_path(invoice), target: :_blank %></b> <%= invoice.txn_date %>
<%= form_with(url: invoice_path, method: :get) do |form| %>
<div class="form-check">
<%= check_box_tag "select_all", "1", false, id: "select-all-batches" %>
<%= label_tag "select-all-batches", "Select All Items" %>
</div>
<% @customer.invoices.order(id: :desc).each do |invoice| %>
<div class="row">
<%= check_box_tag "item_ids[]", invoice.id, false,data: { checkbox_select_all_target: "checkbox", class: "item-checkbox" } %>
<b><%= link_to "##{invoice.doc_number}", invoice_path(invoice), target: :_blank %></b> <%= invoice.txn_date %>
</div>
<% end %>
<%= form.submit "Bulk PDF" %>
<% end %>
<% else %>