mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-11-18 02:20:37 -05:00
Estimates and invoices written are reported without sales tax (new
estimates.tax_amount, filled in by the estimate sync), and a new
Invoices paid in full figure counts invoices on the day they were paid
in full. Payments stay as received, so collected vs. invoiced compares
them with the invoices' totals with tax.
Paid invoices show the day they were paid in full on the customer's
invoice list and the invoice page ("Paid 11/03/2026").
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
36 lines
1.5 KiB
ERB
36 lines
1.5 KiB
ERB
<% unless invoices.empty? %>
|
|
<%= render partial: 'qbo_estimates/status_styles' %>
|
|
|
|
<%= 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 %>
|
|
|
|
<div class="qbo-invoice-list">
|
|
<% invoices.sort.reverse.each do |invoice| %>
|
|
<div class="row">
|
|
<%= check_box_tag "invoice_ids[]", invoice.id, false, onchange: "updateLink()", data: { url: invoice_path(invoice), text: "Invoice ##{invoice.to_s}" }, class: "invoice-checkbox appointment" if invoices.count > 1 %>
|
|
<b><%= link_to "##{invoice.doc_number}", invoice_path(invoice), target: :_blank %></b> <%= invoice.txn_date %>
|
|
<%# Paid / partially paid / overdue / open / voided, from the cached balance and due date %>
|
|
<% if (status = invoice.status) %>
|
|
<span class="qbo-estimate-status qbo-invoice-status-<%= status %>"><%= RedmineQboBilling::InvoiceStatus.label(status, paid_on: invoice.paid_on) %></span>
|
|
<% end %>
|
|
<%= render partial: 'qbo_invoices/invoice_actions', locals: { invoice: invoice } if RedmineQboBilling.invoice_writer? %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
|
|
<% if invoices.count > 1 %>
|
|
<%= form.submit t(:button_bulk_pdf) %>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
<% else %>
|
|
<p><%=t(:label_no_invoices)%>.</p>
|
|
<% end %>
|