Files
redmine_qbo/app/views/invoices/_list.html.erb
Rick Barrette 9ac1261ed0 Sort by id not doc_number
This fixes the bug where documents were displayed out of order
2024-08-30 09:19:58 -04:00

12 lines
312 B
Plaintext

<% 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 %>
</div>
<% end %>
<% else %>
<p><%=t(:label_no_invoices)%>.</p>
<% end %>