Merge pull request #417 from foodcoop1040/deliveries_col
Hide deliveries column if there are no deliveries
This commit is contained in:
commit
b56df39623
1 changed files with 7 additions and 5 deletions
|
@ -10,6 +10,7 @@
|
|||
%th= heading_helper Invoice, :date
|
||||
%th= heading_helper Invoice, :paid_on
|
||||
%th= heading_helper Invoice, :amount
|
||||
- if Delivery.any?
|
||||
%th= heading_helper Invoice, :deliveries
|
||||
%th= heading_helper Invoice, :orders
|
||||
%th= heading_helper Invoice, :note
|
||||
|
@ -23,6 +24,7 @@
|
|||
%td= link_to h(format_date invoice.date), finance_invoice_path(invoice)
|
||||
%td= format_date invoice.paid_on
|
||||
%td= number_to_currency invoice.amount
|
||||
- if Delivery.any?
|
||||
%td><
|
||||
- invoice.deliveries.each_with_index do |delivery, index|
|
||||
= ', ' if index > 0
|
||||
|
|
Loading…
Reference in a new issue