In my email to customers who are able to pay for their order later, I have added the following code to show when they should pay:
{% assign due_date = payment_terms.next_payment.due_at | default: nil %}
{% if payment_terms.type == 'receipt' and due_date == nil %}
{% assign due_date = 'now' %}
{% endif %}
## Payment of {{ order.total_outstanding | money }} is due {{ due_date | date: format: 'date' }}
However, If i choose Net7, Net15, Net30 or pick a custom date. This code shows no date at all?
I tried adding different variables that I though should work in emails like {{ payment_terms.next_payment.due_at}}, {{ payment_terms.current_payment.due_at }} or even {{ payment_terms.payment_terms_name }} just to see if the correct payment term is used (should return Net7 etc.), but they all return nothing?
How can i edit the above code so that it not only shows the correct date for upon receipt but also for net7, net15, net30 and custom dates?
Thank you so much for sharing this! YOU SAVED ME HOURS of hunting down these attributes to display payment terms on our invoices. Only change I made was to the date format, since I was using a template: