2009-08-12 13:38:03 +02:00
|
|
|
.left_column(style="width:55%")
|
2009-05-17 16:11:39 +02:00
|
|
|
- form_for([@supplier,@delivery]) do |f|
|
|
|
|
.box_title
|
|
|
|
%h2 Lieferung anlegen
|
|
|
|
.column_content
|
|
|
|
= f.error_messages
|
|
|
|
= f.hidden_field :supplier_id
|
2009-08-12 13:09:10 +02:00
|
|
|
%b Lagerartikel des Lieferanten
|
2009-05-17 16:11:39 +02:00
|
|
|
#stock_changes
|
|
|
|
- f.fields_for :stock_changes do |stock_change_form|
|
|
|
|
%p
|
|
|
|
= stock_change_form.select :stock_article_id, stock_articles_for_select(@supplier)
|
|
|
|
Menge
|
|
|
|
= stock_change_form.text_field :quantity, :size => 5, :autocomplete => 'off'
|
2009-08-12 13:38:03 +02:00
|
|
|
= stock_change_form.hidden_field :_delete
|
|
|
|
= link_to_function "Artikel aus Lieferung entfernen", "$(this).previous('input').value = 1; $(this).up('p').hide();"
|
2009-05-17 16:11:39 +02:00
|
|
|
%p
|
2009-08-12 13:38:03 +02:00
|
|
|
= remote_link_to "Lagerartikel der Lieferung hinzufügen", :url => {:action => 'add_stock_change', :supplier_id => @supplier.id}
|
2009-08-12 13:09:10 +02:00
|
|
|
%hr/
|
|
|
|
%p
|
|
|
|
%b= f.label :delivered_on, "Lieferdatum"
|
|
|
|
= f.date_select :delivered_on
|
|
|
|
%p
|
|
|
|
%b= f.label :note, "Notiz"
|
|
|
|
%br/
|
2009-08-12 13:38:03 +02:00
|
|
|
= f.text_area :note, :size => "35x4"
|
2009-05-17 16:11:39 +02:00
|
|
|
%p
|
|
|
|
= f.submit "Lieferung speichern"
|
2009-08-12 13:38:03 +02:00
|
|
|
oder
|
|
|
|
= link_to "Abbrechen", supplier_deliveries_path(@supplier)
|
2009-05-17 16:11:39 +02:00
|
|
|
|
2009-08-12 13:38:03 +02:00
|
|
|
.right_column{:style => "width:35%;"}
|
2009-05-17 16:11:39 +02:00
|
|
|
.box_title
|
|
|
|
%h2 Neuen Lagerartikel anlegen
|
|
|
|
.column_content
|
|
|
|
%p
|
|
|
|
:javascript
|
|
|
|
function fillNewStockArticle(text, li) {
|
2010-09-17 18:45:07 +02:00
|
|
|
new Ajax.Updater('stock_article_form', '#{url_for(:controller => "deliveries", :action => "fill_new_stock_article_form")}', {
|
2009-05-17 16:11:39 +02:00
|
|
|
method: 'get',
|
|
|
|
parameters: {article_id: li.id}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
Suche nach Artikeln aus dem
|
|
|
|
%i= @supplier.name
|
|
|
|
Katalog:
|
|
|
|
= text_field_with_auto_complete :article, :name, {}, |
|
|
|
|
{:url => {:controller => 'stockit', :action => 'auto_complete_for_article_name', :supplier_id => @supplier.id}, |
|
|
|
|
:after_update_element => 'fillNewStockArticle', :method => :get} |
|
|
|
|
%hr/
|
|
|
|
#stock_article_form
|
|
|
|
= render :partial => 'stock_article_form', :locals => {:stock_article => @supplier.stock_articles.build}
|
|
|
|
|
|
|
|
%p{:style => "clear:both"}
|
|
|
|
= link_to 'Zurück', supplier_deliveries_path(@supplier)
|