foodsoft/app/views/finance/invoices/_invoices.html.haml

32 lines
1.3 KiB
Plaintext
Raw Normal View History

- if Invoice.count > 20
= items_per_page
= pagination_links_remote @invoices
%table.table.table-striped
%thead
%tr
2013-10-09 23:37:08 +02:00
%th= heading_helper Invoice, :number
%th= heading_helper Invoice, :supplier
%th= heading_helper Invoice, :date
%th= heading_helper Invoice, :paid_on
%th= heading_helper Invoice, :amount
%th= heading_helper Invoice, :delivery
%th= heading_helper Invoice, :order
%th= heading_helper Invoice, :note
%th
%th
%tbody
- for invoice in @invoices
%tr
%td= link_to h(invoice.number), finance_invoice_path(invoice)
%td= invoice.supplier.name
2016-02-17 16:11:20 +01:00
%td= link_to h(format_date invoice.date), finance_invoice_path(invoice)
%td= format_date invoice.paid_on
%td= number_to_currency invoice.amount
2013-12-12 00:13:19 +01:00
%td= link_to Delivery.model_name.human, [invoice.supplier,invoice.delivery] if invoice.delivery
%td= link_to format_date(invoice.order.ends), new_finance_order_path(order_id: invoice.order_id) if invoice.order
%td= truncate(invoice.note)
%td= link_to t('ui.edit'), edit_finance_invoice_path(invoice), class: 'btn btn-mini'
%td= link_to t('ui.delete'), finance_invoice_path(invoice), :data => {:confirm => t('.confirm_delete')}, :method => :delete,
class: 'btn btn-danger btn-mini'