13007: add business name in order cycle report email

This commit is contained in:
Ahmed Ejaz
2024-12-02 11:55:49 +05:00
parent ee2a6bf2e6
commit 302336ab02
3 changed files with 7 additions and 2 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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