- title t('.title', supplier: @supplier.name)

%table.table.table-striped
  %thead
    %tr
      %th= heading_helper Delivery, :date
      %th.numeric= t 'deliveries.invoice_amount'
      %th= heading_helper Delivery, :note
  %tbody
    - for delivery in @deliveries
      %tr
        %td=h delivery.date
        %td.numeric= link_to_invoice(delivery)
        %td= truncate delivery.note
        %td
          = link_to t('ui.show'), [@supplier, delivery], class: 'btn btn-mini'
          = link_to t('ui.edit'), edit_supplier_delivery_path(@supplier,delivery), class: 'btn btn-mini'
          = link_to t('ui.delete'), [@supplier,delivery], :data => {:confirm => t('.confirm_delete')}, :method => :delete,
          class: 'btn btn-mini btn-danger'

= link_to t('.new_delivery', supplier: @supplier.name), new_supplier_delivery_path(@supplier), class: 'btn btn-primary'
|
= link_to t('deliveries.suppliers_overview'), suppliers_path
