Fix and cleanup stock takings (PR #667)
This commit is contained in:
parent
c38abedf2a
commit
2d0a81c92d
7 changed files with 38 additions and 62 deletions
|
|
@ -86,14 +86,4 @@ class StockitController < ApplicationController
|
|||
@articles = Article.not_in_stock.limit(8).where('name LIKE ?', "%#{params[:term]}%")
|
||||
render :json => @articles.map(&:name)
|
||||
end
|
||||
|
||||
def fill_new_stock_article_form
|
||||
article = Article.find(params[:article_id])
|
||||
@supplier = article.supplier
|
||||
stock_article = @supplier.stock_articles.build(
|
||||
article.attributes.reject { |attr| attr == ('id' || 'type')}
|
||||
)
|
||||
|
||||
render :partial => 'form', :locals => {:stock_article => stock_article}
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue