Skip to content

Commit

Permalink
12993: translate tax incl and qty
Browse files Browse the repository at this point in the history
  • Loading branch information
chahmedejaz committed Dec 7, 2024
1 parent af200ab commit f8003b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/views/producer_mailer/order_cycle_report.text.haml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Orders summary
= t :producer_mail_order_text
\
- @grouped_line_items.each_pair do |product_and_full_name, line_items|
#{line_items.first.variant.sku} - #{raw(line_items.first.variant.supplier.name)} - #{raw(product_and_full_name)} (QTY: #{line_items.sum(&:quantity)}) @ #{line_items.first.single_money} = #{Spree::Money.new(line_items.sum(&:total), currency: line_items.first.currency)} (#{Spree::Money.new(line_items.sum(&:included_tax), currency: line_items.first.currency)} tax incl.)
#{line_items.first.variant.sku} - #{raw(line_items.first.variant.supplier.name)} - #{raw(product_and_full_name)} (#{t(:producer_mail_qty)}: #{line_items.sum(&:quantity)}) @ #{line_items.first.single_money} = #{Spree::Money.new(line_items.sum(&:total), currency: line_items.first.currency)} (#{t(:with_tax_incl, amount: Spree::Money.new(line_items.sum(&:included_tax), currency: line_items.first.currency))})
\
\
#{t :total}: #{@total}
Expand All @@ -24,7 +24,7 @@ Orders summary
= t :producer_mail_order_customer_text
\
- @customer_line_items.each do |line_item|
#{line_item[:sku]} - #{raw(line_item[:supplier_name])} - #{raw(line_item[:product_and_full_name])} (QTY: #{line_item[:quantity]}) - #{raw(line_item[:first_name])} #{raw(line_item[:last_name])}
#{line_item[:sku]} - #{raw(line_item[:supplier_name])} - #{raw(line_item[:product_and_full_name])} (#{t(:producer_mail_qty)}: #{line_item[:quantity]}) - #{raw(line_item[:first_name])} #{raw(line_item[:last_name])}
\
\
= t :producer_mail_text_after
Expand Down
2 changes: 2 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,8 @@ en:
sku: "SKU"
subtotal: "Subtotal"
tax_rate: "Tax rate"
with_tax_incl: "%{amount} tax incl."
producer_mail_qty: QTY
validators:
date_time_string_validator:
not_string_error: "must be a string"
Expand Down

0 comments on commit f8003b0

Please sign in to comment.