Only show undeleted articles in delivery/stock_taking forms.
Fixed 100.
This commit is contained in:
parent
80b203a8da
commit
da72d3a61c
2 changed files with 2 additions and 2 deletions
|
@ -7,7 +7,7 @@ class StockTakingsController < ApplicationController
|
|||
|
||||
def new
|
||||
@stock_taking = StockTaking.new
|
||||
StockArticle.all.each { |a| @stock_taking.stock_changes.build(:stock_article => a) }
|
||||
StockArticle.undeleted.each { |a| @stock_taking.stock_changes.build(:stock_article => a) }
|
||||
end
|
||||
|
||||
def create
|
||||
|
|
|
@ -11,7 +11,7 @@ module DeliveriesHelper
|
|||
end
|
||||
|
||||
def stock_articles_for_select(supplier)
|
||||
supplier.stock_articles.map {|a| ["#{a.name} (#{number_to_currency a.price}/#{a.unit})", a.id] }
|
||||
supplier.stock_articles.undeleted.map {|a| ["#{a.name} (#{number_to_currency a.price}/#{a.unit})", a.id] }
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue