finish documents i18n

This commit is contained in:
wvengen 2013-04-04 02:04:31 +02:00
parent 24d04b25db
commit 8c8778459e
5 changed files with 68 additions and 24 deletions

View file

@ -2,11 +2,12 @@
class OrderByArticles < OrderPdf
def filename
"Bestellung #{@order.name}-#{@order.ends.to_date} - Artikelsortierung.pdf"
I18n.t('documents.order_by_articles.filename', :name => @order.name, :date => @order.ends.to_date) + '.pdf'
end
def title
"Artikelsortierung der Bestellung: #{@order.name}, beendet am #{@order.ends.strftime('%d.%m.%Y')}"
I18n.t('documents.order_by_articles.title', :name => @order.name,
:date => @order.ends.strftime(I18n.t('date.formats.default')))
end
def body
@ -14,7 +15,7 @@ class OrderByArticles < OrderPdf
text "#{order_article.article.name} (#{order_article.article.unit} | #{order_article.price.unit_quantity.to_s} | #{number_with_precision(order_article.price.fc_price, precision: 2)})",
style: :bold, size: 10
rows = []
rows << %w(Bestellgruppe Menge Preis)
rows << I18n.t('documents.order_by_articles.rows')
for goa in order_article.group_order_articles
rows << [goa.group_order.ordergroup.name,
goa.result,
@ -30,4 +31,4 @@ class OrderByArticles < OrderPdf
end
end
end
end