diff --git a/app/views/producer_mailer/order_cycle_report.text.haml b/app/views/producer_mailer/order_cycle_report.text.haml index 5c94107bd4..31e2cf54d9 100644 --- a/app/views/producer_mailer/order_cycle_report.text.haml +++ b/app/views/producer_mailer/order_cycle_report.text.haml @@ -1,16 +1,16 @@ -Dear #{@producer.name}, +#{t :producer_mail_greeting} #{@producer.name}, \ = t :producer_mail_text_before \ - if @receival_instructions - Stock pickup/delivery instructions: + = t :producer_mail_delivery_instructions = @receival_instructions \ Orders summary ================ \ -Here is a summary of the orders for your products: += t :producer_mail_order_text \ - @line_items.each_pair do |variant, line_item| #{variant.sku} - #{raw(variant.product.supplier.name)} - #{raw(variant.product_and_full_name)} (QTY: #{line_item.quantity}) @ #{line_item.single_money} = #{line_item.display_amount} @@ -19,6 +19,8 @@ Here is a summary of the orders for your products: Total: #{@total} \ = t :producer_mail_text_after + +#{t :producer_mail_signoff}, #{@coordinator.name} #{@coordinator.address.address1}, #{@coordinator.address.city}, #{@coordinator.address.zipcode} #{@coordinator.phone} diff --git a/spec/mailers/producer_mailer_spec.rb b/spec/mailers/producer_mailer_spec.rb index b27245abe2..01042b56f2 100644 --- a/spec/mailers/producer_mailer_spec.rb +++ b/spec/mailers/producer_mailer_spec.rb @@ -68,6 +68,7 @@ describe ProducerMailer do end it "includes the total" do + puts mail.text_part.body.encoded mail.body.encoded.should include 'Total: $30.00' Capybara.string(mail.html_part.body.encoded) .find("tr.total-row")