Files
openfoodnetwork/app/views/spree/shared/_payment.html.haml
Jean-Baptiste Bellet 7ab065e8cd 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"
2021-05-19 11:55:38 +02:00

21 lines
663 B
Plaintext

%p.callout
%span{:style => "float:right;"}
- if @order.outstanding_balance?
= outstanding_balance_label(@order)
\:
%strong= @order.display_outstanding_balance
- else
- if @order.paid?
= t :email_payment_paid
- else
= t :email_payment_not_paid
%strong
= 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