2009-01-16 02:17:49 +01:00
|
|
|
- title "Neue Lieferung von #{@supplier.name}"
|
|
|
|
|
2009-02-06 16:26:35 +01:00
|
|
|
.left_column
|
|
|
|
- form_for([@supplier,@delivery]) do |f|
|
|
|
|
.box_title
|
|
|
|
%h2 Lieferung anlegen
|
|
|
|
.column_content
|
|
|
|
= f.error_messages
|
|
|
|
= f.hidden_field :supplier_id
|
|
|
|
%p
|
|
|
|
%b= f.label :delivered_on
|
|
|
|
= f.date_select :delivered_on
|
|
|
|
%h2 Lagerartikel des Lieferanten
|
|
|
|
#stock_changes
|
|
|
|
= render :partial => 'stock_change', :collection => @delivery.stock_changes
|
|
|
|
%p
|
|
|
|
= f.submit "Lieferung anlegen"
|
|
|
|
|
|
|
|
.right_column{:style => "width:35em;"}
|
|
|
|
.box_title
|
|
|
|
%h2 Neuen Lagerartikel anlegen
|
|
|
|
.column_content
|
2009-02-10 20:06:08 +01:00
|
|
|
%p
|
|
|
|
:javascript
|
|
|
|
function fillNewStockArticle(text, li) {
|
2009-02-12 18:32:20 +01:00
|
|
|
new Ajax.Updater('stock_article_form', '/deliveries/fill_new_stock_article_form', {
|
2009-02-10 20:06:08 +01:00
|
|
|
method: 'get',
|
|
|
|
parameters: {article_id: li.id}
|
|
|
|
});
|
|
|
|
}
|
2009-02-12 18:32:20 +01:00
|
|
|
Suche nach Artikeln aus dem
|
|
|
|
%i= @supplier.name
|
|
|
|
Katalog:
|
2009-02-10 20:06:08 +01:00
|
|
|
= text_field_with_auto_complete :article, :name, {}, |
|
2009-02-12 18:32:20 +01:00
|
|
|
{:url => {:controller => 'stockit', :action => 'auto_complete_for_article_name', :supplier_id => @supplier.id}, |
|
|
|
|
:after_update_element => 'fillNewStockArticle', :method => :get} |
|
2009-02-10 20:06:08 +01:00
|
|
|
%hr/
|
2009-02-12 18:32:20 +01:00
|
|
|
#stock_article_form
|
|
|
|
= render :partial => 'stock_article_form', :locals => {:stock_article => @supplier.stock_articles.build}
|
2009-02-06 16:26:35 +01:00
|
|
|
|
|
|
|
%p{:style => "clear:both"}
|
2009-02-10 20:06:08 +01:00
|
|
|
= link_to 'Zurück', supplier_deliveries_path(@supplier)
|