I am working on a salesOrder template, I need to put some informations from the items.
I am able to print the item field values, but it prints the values of the first line only and it is repeated for all the lines.
itemid is correctly updated for each line, but itemimage is not

Any idea?

```
            <#if record.item?has_content>
                <table class="itemtable" style="width: 100%; margin-top: 10px;">
                <!-- start lines -->
                <#list record.item as line>
                 <#if line_index==0>
                  <thead>
                    <tr>
                      <th colspan="5"></th>
                      <th colspan="8">Commercial Reference</th>
                      <th colspan="11">${line.description@label}</th>
                      <th colspan="2" align="center">Size</th>
                      <th align="center" colspan="3">${line.quantity@label}</th>
                      <th align="right" colspan="4">${line.rate@label}</th>
                      <th align="right" colspan="4">${line.amount@label}</th>
                    </tr>
                  </thead>
                  </#if>
                 <tr>
                    <#assign itemid = record.item.item>
                      <#assign itemimage = record.item.item.custitem_atlas_item_image>
                        <td colspan="5" align="center">--${itemid}-${itemimage}-${line.item}<@filecabinet nstype="image" alt="" src="${itemimage}" style="float: left; width: 50px; height:100px" /></td>
                        <td colspan="8"><span class="itemname">${line.custcol_noda_style}</span></td>
                        <td colspan="11">${line.custcol_noda_description}</td>

                      <td colspan="2">${line.custcol_noda_size}</td>
                      <td align="center" colspan="3" line-height="150%">${line.quantity}</td>
                      <td align="right" colspan="4">${line.rate}</td>
                      <td align="right" colspan="4">${line.amount}</td>
                      </tr>
                    </#list><!-- end lines --></table>

                  <hr /></#if>

```