The FOSSBilling Forum Support Support - Setup & Configuration Email template - invoice.lines - How to show purchased items of invoice?

Email template - invoice.lines - How to show purchased items of invoice?

Email template - invoice.lines - How to show purchased items of invoice?

 
  • 1 Vote(s) - 5 Average
 
BelleNottelling
Administrator

69
10-31-2024, 11:04 AM #2
invoice.lines is an array, so invoice.lines.lines is trying to reference an array key that does not exist.

You want something like so to iterate over each line item:

Code:

<ul>
  {% for line in invoice.lines %}
    <li>{{ line.title }} {{ line.price }}</li>
  {% endfor %}
</ul>

There is also line.period, line.quantity, line.unit, line.price, line.tax, line.taxed, line.charged, and line.total.
BelleNottelling
10-31-2024, 11:04 AM #2

invoice.lines is an array, so invoice.lines.lines is trying to reference an array key that does not exist.

You want something like so to iterate over each line item:

Code:

<ul>
  {% for line in invoice.lines %}
    <li>{{ line.title }} {{ line.price }}</li>
  {% endfor %}
</ul>

There is also line.period, line.quantity, line.unit, line.price, line.tax, line.taxed, line.charged, and line.total.

 
  • 1 Vote(s) - 5 Average

Messages In This Thread
Email template - invoice.lines - How to show purchased items of invoice? - by diogo-plta - 10-30-2024, 05:44 PM
RE: Email template - invoice.lines - How to show purchased items of invoice? - by BelleNottelling - 10-31-2024, 11:04 AM
RE: Email template - invoice.lines - How to show purchased items of invoice? - by diogo-plta - 10-31-2024, 12:09 PM
RE: Email template - invoice.lines - How to show purchased items of invoice? - by BelleNottelling - 11-03-2024, 02:55 PM
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)