mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-05 22:26:07 +00:00
13007: add business name in order cycle report email
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user