Fixed articles module.

This commit is contained in:
benni 2012-10-28 18:03:50 +01:00
parent f30e57dd49
commit fc1c173718
14 changed files with 124 additions and 147 deletions

View file

@ -6,35 +6,8 @@
Achtung, momentan gibt es keine Überprüfung auf doppelte Artikel.
= form_tag(create_from_upload_supplier_articles_path(@supplier)) do
%table
%tr
%th Nummer
%th Name
%th Notiz
%th Hersteller
%th Herkunft
%th Einheit
%th Nettopreis
%th MwSt
%th Pfand
%th Gebindegröße
%th Kategorie
- for article in @articles
= fields_for "articles[]", article do |form|
%tr{:class => cycle('even', 'odd')}
%td= form.text_field 'order_number', :size => 6
%td= form.text_field 'name', :size => 0
%td= form.text_field 'note', :size => 15
%td= form.text_field 'manufacturer', :size => 6
%td= form.text_field 'origin', :size => 6
%td= form.text_field 'unit', :size => 5
%td= form.text_field 'price', :size => 4
%td= form.text_field 'tax', :size => 4
%td= form.text_field 'deposit', :size => 4
%td= form.text_field 'unit_quantity', :size => 4
%td= form.select 'article_category_id', ArticleCategory.find(:all).collect {|a| [ a.name, a.id ] }
%p
= submit_tag "Speichere neue Artikel für #{@supplier.name}"
|
= link_to "Zurück", upload_supplier_articles_path(@supplier)
= render 'edit_all_table'
.form-actions
= submit_tag "Speichere neue Artikel für #{@supplier.name}", class: 'btn btn-primary'
= link_to "order abbrechen", upload_supplier_articles_path(@supplier)