From e540cb1e599604721f2290dd14706a4fb5c18e3e Mon Sep 17 00:00:00 2001 From: viehlieb Date: Tue, 14 Feb 2023 16:52:19 +0100 Subject: [PATCH] add custom_csv_collection to orders helper --- app/helpers/orders_helper.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/helpers/orders_helper.rb b/app/helpers/orders_helper.rb index ff238730..5f7fb904 100644 --- a/app/helpers/orders_helper.rb +++ b/app/helpers/orders_helper.rb @@ -155,4 +155,16 @@ module OrdersHelper link_to t('orders.index.action_receive'), receive_order_path(order), class: "btn#{' btn-success' unless order.received?} #{options[:class]}" end end + + def custom_csv_collection + [ + OrderArticle.human_attribute_name(:units_to_order), + Article.human_attribute_name(:order_number), + Article.human_attribute_name(:name), + Article.human_attribute_name(:unit), + Article.human_attribute_name(:unit_quantity_short), + ArticlePrice.human_attribute_name(:price), + OrderArticle.human_attribute_name(:total_price) + ] + end end