diff --git a/app/mailers/producer_mailer.rb b/app/mailers/producer_mailer.rb index 99c5f0f4f5..be341834ba 100644 --- a/app/mailers/producer_mailer.rb +++ b/app/mailers/producer_mailer.rb @@ -86,7 +86,8 @@ class ProducerMailer < ApplicationMailer product_and_full_name: line_item.product_and_full_name, quantity: line_item.quantity, first_name: line_item.order.billing_address.first_name, - last_name: line_item.order.billing_address.last_name + last_name: line_item.order.billing_address.last_name, + business_name: line_item.order.customer.code, } end.sort_by { |line_item| [line_item[:last_name].downcase, line_item[:first_name].downcase] } end diff --git a/app/views/producer_mailer/order_cycle_report.html.haml b/app/views/producer_mailer/order_cycle_report.html.haml index 4b85b9ce44..fa656ead36 100644 --- a/app/views/producer_mailer/order_cycle_report.html.haml +++ b/app/views/producer_mailer/order_cycle_report.html.haml @@ -81,6 +81,8 @@ = t :first_name %th.text-right = t :last_name + %th.text-right + = t :business_name %tbody - @customer_line_items.each do |line_item| %tr @@ -97,6 +99,8 @@ = line_item[:first_name] %td = line_item[:last_name] + %td + = line_item[:business_name] %p = t :producer_mail_text_after %p diff --git a/app/views/producer_mailer/order_cycle_report.text.haml b/app/views/producer_mailer/order_cycle_report.text.haml index ce85b66ea5..6b6b7112c8 100644 --- a/app/views/producer_mailer/order_cycle_report.text.haml +++ b/app/views/producer_mailer/order_cycle_report.text.haml @@ -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])} (#{t(:producer_mail_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])} #{raw(line_item[:business_name])} \ \ = t :producer_mail_text_after