-
Notifications
You must be signed in to change notification settings - Fork 1
/
_invoices.html.erb
23 lines (23 loc) · 1.01 KB
/
_invoices.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<table>
<tr>
<th class="right">#</th>
<th>Firmenname</th>
<th>Rechnungssumme</th>
<th>Rechnungsdatum</th>
<th>Pdf</th>
<th>Doc</th>
</tr>
<%- for invoice in invoices -%>
<tr class="<%= cycle('list-line-odd', 'list-line-even') %>">
<td class="right"><%= h invoice.invoice_num %></td>
<td class="right"><%= link_to invoice.customer.company_name, customer_url(invoice.customer) %></td>
<td class="right"><%= number_to_currency_with_euro(invoice.sum) %></td>
<td class="right"><%= l invoice.date, :format => :long %></td>
<td><% if invoice.pdf%><%= link_to image_tag("acroread.png"), invoice.pdf.authenticated_s3_url %><% end %></td>
<td><% if invoice.doc%><%= link_to image_tag("word.png"), invoice.doc.authenticated_s3_url %><% end %></td>
<td><%= link_to 'Zeigen', invoice %></td>
<td><%= link_to 'Bearbeiten', edit_invoice_path(invoice) %></td>
<td><%= link_to 'Löschen', invoice, :confirm => 'Sind Sie sicher?', :method => :delete %></td>
</tr>
<%- end -%>
</table>