From aa6041d33756a7e91e4675d95c0ad2dc1224f8dc Mon Sep 17 00:00:00 2001 From: wvengen Date: Sat, 21 Dec 2013 17:33:06 +0100 Subject: [PATCH] show all articles in receive screen (not just of this order) --- app/views/orders/_edit_amounts.html.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/orders/_edit_amounts.html.haml b/app/views/orders/_edit_amounts.html.haml index 690288dd..311d1e8f 100644 --- a/app/views/orders/_edit_amounts.html.haml +++ b/app/views/orders/_edit_amounts.html.haml @@ -1,4 +1,5 @@ -- new_article_data = articles_for_select2(@order.articles, @order_articles.map(&:article_id)) {|a| "#{a.name} (#{a.unit_quantity}⨯#{a.unit})" } +- new_articles = (@order.supplier.articles rescue @order.articles) +- new_article_data = articles_for_select2(new_articles, @order_articles.map(&:article_id)) {|a| "#{a.name} (#{a.unit_quantity}⨯#{a.unit})" } - content_for :javascript do :javascript