Alle Artikel von <%= @supplier.name %> bearbeiten

<% form_tag do -%> <%= select_tag :switch_supplier, options_for_select( Supplier.all.collect {|s| [s.name, url_for(edit_all_supplier_articles_path(s))] }, url_for(edit_all_supplier_articles_path(@supplier)) ), :onchange => "redirectTo(this)", :style => "font-size: 0.9em;margin-left:1em;" %> <% end %>

Pflichtfelder sind: Name, Einheit, (netto) Preis und Bestellnummer.

<% form_tag(update_all_supplier_articles_path(@supplier)) do %> <% for article in @articles %> <% fields_for 'articles[]', article do |form| %> > <% end %> <% end %>
verf. Name Einheit Preis GebGr Best.Nr. Notiz Kategorie MwSt. Pfand
<%= form.check_box 'availability' -%> <%= form.text_field 'name', :size => 0 -%> <%= form.text_field 'unit', :size => 5 -%> <%= form.text_field 'price', :size => 4 -%> <%= form.text_field 'unit_quantity', :size => 4 -%> <%= form.text_field 'order_number', :size => 6 -%> <%= form.text_field 'note', :size => 15 -%> <%= form.select 'article_category_id', ArticleCategory.find(:all).collect {|a| [ a.name, a.id ] }, { :include_blank => true } -%> <%= form.text_field 'tax', :size => 4 -%> <%= form.text_field 'deposit', :size => 4 -%>

Achtung, alle Artikel werden aktualisiert!
<%= submit_tag 'Alle Artikel aktualisieren'%> | <%= link_to 'Abbrechen', supplier_articles_path(@supplier) %> <% end %>