2012-04-15 19:59:39 +02:00
|
|
|
# encoding: utf-8
|
2009-01-06 11:49:19 +01:00
|
|
|
module OrdersHelper
|
|
|
|
|
2009-01-29 01:57:51 +01:00
|
|
|
def update_articles_link(order, text, view)
|
2011-06-20 00:26:17 +02:00
|
|
|
link_to text, order_path(order, :view => view), :remote => true
|
2009-01-29 01:57:51 +01:00
|
|
|
end
|
|
|
|
|
2012-10-02 02:50:48 +02:00
|
|
|
def order_pdf(order, document)
|
2009-01-29 01:57:51 +01:00
|
|
|
link_to image_tag("save_pdf.png", :size => "16x16", :border => "0", :alt => "PDF erstellen"),
|
2012-10-02 02:50:48 +02:00
|
|
|
order_path(order, :document => document, :format => :pdf), { :title => "PDF erstellen" }
|
2009-01-06 11:49:19 +01:00
|
|
|
end
|
2009-02-11 15:23:59 +01:00
|
|
|
|
|
|
|
def options_for_suppliers_to_select
|
2011-06-10 13:53:51 +02:00
|
|
|
options = [["Lieferantin/Lager auswählen"]]
|
|
|
|
options += Supplier.all.map {|s| [ s.name, url_for(:action => "new", :supplier_id => s)] }
|
|
|
|
options += [["Lager", url_for(:action => 'new', :supplier_id => 0)]]
|
|
|
|
options_for_select(options)
|
2009-02-11 15:23:59 +01:00
|
|
|
end
|
2009-01-06 11:49:19 +01:00
|
|
|
end
|