foodsoft/app/helpers/deliveries_helper.rb

13 lines
362 B
Ruby
Raw Normal View History

module DeliveriesHelper
2009-01-18 17:42:51 +01:00
def link_to_invoice(delivery)
if delivery.invoice
link_to number_to_currency(delivery.invoice.amount), [:finance, delivery.invoice],
:title => "Rechnung anzeigen"
else
link_to "Rechnung anlegen", new_finance_invoice_path(:supplier_id => delivery.supplier.id, :delivery_id => delivery.id)
end
end
end