Fixed orders form.

This commit is contained in:
benni 2011-06-10 13:53:51 +02:00
parent 9ad93e9c06
commit afb2c26ab3
7 changed files with 77 additions and 94 deletions

View file

@ -12,8 +12,9 @@ module OrdersHelper
end
def options_for_suppliers_to_select
suppliers = Supplier.without_deleted.collect {|s| [ s.name, url_for(:action => "new", :supplier_id => s)] }
stockit = [["Lager", url_for(:action => 'new', :supplier_id => 0)]]
options_for_select(stockit + suppliers)
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)
end
end