Introduced StockTaking. TODO: Dry up the stockit/stock_takings/deliveries controllers/views!
This commit is contained in:
parent
2bb4cdb9d6
commit
951d19db6a
30 changed files with 436 additions and 55 deletions
|
|
@ -1,6 +1,9 @@
|
|||
- form_for stock_article do |form|
|
||||
= form.error_messages
|
||||
= form.hidden_field :supplier_id
|
||||
%p
|
||||
Lieferant
|
||||
%br/
|
||||
= form.select :supplier_id, Supplier.without_deleted(:order => 'name').collect{ |s| [s.name, s.id] }
|
||||
%p
|
||||
Name
|
||||
%br/
|
||||
|
|
@ -27,7 +30,7 @@
|
|||
%br/
|
||||
= form.text_field :deposit
|
||||
- else
|
||||
%p
|
||||
%p
|
||||
Preis:
|
||||
%br/
|
||||
Um Chaos zu vermeiden können bis auf weiteres die Preise von angelegten
|
||||
|
|
|
|||
|
|
@ -13,14 +13,11 @@
|
|||
.box_title
|
||||
.column_content
|
||||
#actions
|
||||
%b Neuen Lagerartikel anlegen für
|
||||
= select_tag :new_stock_article, |
|
||||
options_for_select([[" -- Lieferantin wählen --", ""]] + |
|
||||
Supplier.without_deleted.collect {|s| [ s.name, url_for(new_stock_article_path(:supplier_id => s))] }), |
|
||||
:onchange => "redirectTo(this)", :style => "font-size: 0.9em;margin-left:1em;" |
|
||||
|
||||
%b= link_to "Neuen Lagerartikel anlegen", new_stock_article_path
|
||||
|
|
||||
= link_to_if @current_user.role_orders?, "Lagerbestellung online stellen", {:controller => 'orders', :action => 'new', :supplier_id => 0}
|
||||
|
|
||||
= link_to "Inventur anlegen", new_stock_taking_path
|
||||
|
||||
#articles{:style => "clear:both;margin-top:1em"}
|
||||
%table.list
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
- title "Neuen Lagerartikel für #{@supplier.name} anlegen"
|
||||
- title "Neuen Lagerartikel anlegen"
|
||||
|
||||
:javascript
|
||||
function fillNewStockArticle(text, li) {
|
||||
|
|
@ -8,9 +8,9 @@
|
|||
}
|
||||
|
||||
%p
|
||||
Suche nach Artikeln aus dem Katalog:
|
||||
Suche nach Artikeln aus allen Katalogen:
|
||||
= text_field_with_auto_complete :article, :name, {}, |
|
||||
{:url => {:action => 'auto_complete_for_article_name', :supplier_id => @supplier.id}, |
|
||||
{:url => {:action => 'auto_complete_for_article_name'}, |
|
||||
:after_update_element => 'fillNewStockArticle'} |
|
||||
#stock_article_form
|
||||
= render :partial => 'form', :locals => {:stock_article => @stock_article}
|
||||
Loading…
Add table
Add a link
Reference in a new issue