<% title "Rechnungen" %>

<%= will_paginate @invoices %>

<% for invoice in @invoices %> <% end %>
Nummer Lieferantin Datum Bezahlt am Betrag Lieferung Bestellung Note
<%= link_to h(invoice.number), finance_invoice_path(invoice)%> <%= invoice.supplier.name %> <%= format_date invoice.date %> <%= format_date invoice.paid_on %> <%= number_to_currency invoice.amount %> <%= link_to "Lieferung", [invoice.supplier,invoice.delivery] if invoice.delivery %> <%= link_to format_date(invoice.order.ends), new_finance_order_path(order_id: invoice.order_id) if invoice.order %> <%= truncate(invoice.note) %> <%= link_to icon(:edit), edit_finance_invoice_path(invoice) %> <%= link_to icon(:delete), finance_invoice_path(invoice), :confirm => 'Are you sure?', :method => :delete %>

<%= link_to 'Neue Rechnung anlegen', new_finance_invoice_path %>