foodsoft/app/helpers/finance/order_articles_helper.rb

10 lines
243 B
Ruby

module Finance::OrderArticlesHelper
def new_order_articles_collection
if @order.stockit?
StockArticle.undeleted.reorder('articles.name')
else
@order.supplier.articles.undeleted.reorder('articles.name')
end
end
end