Add section at the bottom of invoice: Payment Description at Checkout

- If there is any payments, we use the last one to retrieve the payment method description
Use the first completed payment to display payment description
Completed is state = "checkout" or state = "completed"
Squash w/ "Add section at the bottom of invoice: Payment Description at Checkout"

Squash w "Add section at the bottom of invoice: Payment Description a"
This commit is contained in:
Jean-Baptiste Bellet
2021-05-18 16:32:47 +02:00
parent aea0670268
commit 7ab065e8cd
2 changed files with 6 additions and 0 deletions

View File

@@ -13,3 +13,8 @@
= t :email_payment_summary
- if @order.payments.any?
= render partial: 'spree/shared/payments_list', locals: { payments: @order.payments }
- if last_payment_method(@order).present?
%p.callout{style: "margin-top: 40px"}
%strong
= t :email_payment_description
%p{style: "margin: 5px"}= last_payment_method(@order).description

View File

@@ -1669,6 +1669,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using
email_order_summary_includes_tax: "(includes tax):"
email_payment_paid: PAID
email_payment_not_paid: NOT PAID
email_payment_description: Payment Description at Checkout
email_payment_summary: Payment summary
email_payment_method: "Paying via:"
email_so_placement_intro_html: "You have a new order with <strong>%{distributor}</strong>"