feat(order): export order to custom csv file
add custom_csv_collection to orders helper add rute and controller method to orders controller add custom csv to download dropdown add functionality to choose column headers + order for custom csv and append order.sum gross&net to custom csv
This commit is contained in:
parent
6ce659e78a
commit
f38e2bff70
13 changed files with 111 additions and 17 deletions
|
|
@ -20,6 +20,7 @@ class RenderCsv
|
|||
end
|
||||
data { |d| csv << d }
|
||||
end
|
||||
ret << I18n.t('.orders.articles.prices_sum') << ";" << "#{number_to_currency(@object.sum(:gross))}/#{number_to_currency(@object.sum(:net))}" if @options[:custom_csv]
|
||||
ret.encode(@options[:encoding], invalid: :replace, undef: :replace)
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue