diff --git a/app/views/orders/show.html.haml b/app/views/orders/show.html.haml index b3be5bde..f554bb10 100644 --- a/app/views/orders/show.html.haml +++ b/app/views/orders/show.html.haml @@ -55,7 +55,8 @@ %li= order_pdf(@order, :articles, t('.download.article_pdf')) %li= order_pdf(@order, :matrix, t('.download.matrix_pdf')) %li= order_pdf(@order, :fax, t('.download.fax_pdf')) - %li= link_to t('.download.fax_txt'), order_path(@order, format: :txt), {title: t('.download.download_file')} + - unless @order.stockit? + %li= link_to t('.download.fax_txt'), order_path(@order, format: :txt), {title: t('.download.download_file')} %li= link_to t('.download.fax_csv'), order_path(@order, format: :csv), {title: t('.download.download_file')} - if @order.open? diff --git a/lib/order_csv.rb b/lib/order_csv.rb index 4a3114bb..d2c458c2 100644 --- a/lib/order_csv.rb +++ b/lib/order_csv.rb @@ -20,7 +20,7 @@ class OrderCsv < RenderCSV oa.article.order_number, oa.article.name, oa.article.unit + (oa.price.unit_quantity > 1 ? " × #{oa.price.unit_quantity}" : ''), - number_to_currency(oa.article_price.price * oa.article_price.unit_quantity), + number_to_currency(oa.article.price * oa.article.unit_quantity), number_to_currency(oa.total_price) ] end