2012-11-10 16:44:05 +01:00
|
|
|
- if Invoice.count > 20
|
|
|
|
= items_per_page
|
|
|
|
= pagination_links_remote @invoices
|
|
|
|
|
|
|
|
%table.table.table-striped
|
|
|
|
%thead
|
|
|
|
%tr
|
2013-02-27 12:31:01 +01:00
|
|
|
%th= t 'simple_form.labels.invoice.number'
|
|
|
|
%th= t 'simple_form.labels.invoice.supplier'
|
|
|
|
%th= t 'simple_form.labels.invoice.date'
|
|
|
|
%th= t 'simple_form.labels.invoice.paid_on'
|
|
|
|
%th= t 'simple_form.labels.invoice.amount'
|
|
|
|
%th= t 'simple_form.labels.invoice.delivery'
|
|
|
|
%th= t 'simple_form.labels.invoice.order'
|
|
|
|
%th= t 'simple_form.labels.invoice.note'
|
2012-11-10 16:44:05 +01:00
|
|
|
%th
|
|
|
|
%th
|
|
|
|
%tbody
|
|
|
|
- for invoice in @invoices
|
|
|
|
%tr
|
|
|
|
%td= link_to h(invoice.number), finance_invoice_path(invoice)
|
|
|
|
%td= invoice.supplier.name
|
|
|
|
%td= format_date invoice.date
|
|
|
|
%td= format_date invoice.paid_on
|
|
|
|
%td= number_to_currency invoice.amount
|
2013-02-27 12:31:01 +01:00
|
|
|
%td= link_to t('.delivery'), [invoice.supplier,invoice.delivery] if invoice.delivery
|
2012-11-10 16:44:05 +01:00
|
|
|
%td= link_to format_date(invoice.order.ends), new_finance_order_path(order_id: invoice.order_id) if invoice.order
|
|
|
|
%td= truncate(invoice.note)
|
2013-02-27 12:31:01 +01:00
|
|
|
%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), :confirm => t('.confirm_delete'), :method => :delete,
|
|
|
|
class: 'btn btn-danger btn-mini'
|