Only show undeleted articles in delivery/stock_taking forms.

Fixed 100.
This commit is contained in:
Benjamin Meichsner 2013-03-23 18:25:54 +01:00
parent 80b203a8da
commit da72d3a61c
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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