fix fax documents for stock orders (closes foodcoops#79)

This commit is contained in:
wvengen 2014-09-02 15:47:01 +02:00
parent da2b5b54d0
commit a699f95903
2 changed files with 3 additions and 2 deletions

View file

@ -55,6 +55,7 @@
%li= order_pdf(@order, :articles, t('.download.article_pdf')) %li= order_pdf(@order, :articles, t('.download.article_pdf'))
%li= order_pdf(@order, :matrix, t('.download.matrix_pdf')) %li= order_pdf(@order, :matrix, t('.download.matrix_pdf'))
%li= order_pdf(@order, :fax, t('.download.fax_pdf')) %li= order_pdf(@order, :fax, t('.download.fax_pdf'))
- 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_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')} %li= link_to t('.download.fax_csv'), order_path(@order, format: :csv), {title: t('.download.download_file')}

View file

@ -20,7 +20,7 @@ class OrderCsv < RenderCSV
oa.article.order_number, oa.article.order_number,
oa.article.name, oa.article.name,
oa.article.unit + (oa.price.unit_quantity > 1 ? " × #{oa.price.unit_quantity}" : ''), 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) number_to_currency(oa.total_price)
] ]
end end