Alexander Cuadros
03/05/2024, 3:39 PMEmily S
03/05/2024, 5:15 PMStefan Reeder
03/05/2024, 11:59 PM<#if item.description?contains("<br />")>
<tr>
<td align="center" colspan="3" line-height="150%">${item.quantity}</td>
<td colspan="15"><span class="itemname">${item.item}</span></td>
<td align="right" colspan="4">${item.rate}</td>
<td align="right" colspan="4">${item.amount}</td>
</tr>
<#assign desclines = item.description?split("<br />") />
<#list desclines as description>
<tr>
<td style="padding:1px 2px" align="center" colspan="3"> </td>
<td style="padding:1px 2px" colspan="15">${description}</td>
<td style="padding:1px 2px" align="right" colspan="4"></td>
<td style="padding:1px 2px" align="right" colspan="4"></td>
</tr>
</#list>
<#else>
<tr>
<td align="center" colspan="3" line-height="150%">${item.quantity}</td>
<td colspan="15"><span class="itemname">${item.item}</span><br />${item.description}</td>
<td align="right" colspan="4">${item.rate}</td>
<td align="right" colspan="4">${item.amount}</td>
</tr>
</#if>
You need to create a new main table row for each description line. Depending on your formatting you may need some added logic to format only the first/last line (if you have top/bottom borders per item etc...)
In the example above, the items are shown with the SKU on the first line, then the description on line 2+Stefan Reeder
03/06/2024, 12:02 AM<table style="width: 100%; margin-top: 5px;">
<!-- start items -->
<#list record.item as item>
<#if item_index==0>
<thead>
<tr>
<th align="center" colspan="3" style="padding: 5px 5px;">${item.quantity@label}</th>
<th colspan="15" style="padding: 5px px;">${item.item@label}</th>
<th align="right" colspan="4" style="padding: 5px 5px;">${item.rate@label}</th>
<th align="right" colspan="4" style="padding: 5px 5px;">${item.amount@label}</th>
</tr>
</thead>
</#if>
<#if item.description?contains("<br />")>
<tr>
<td align="center" colspan="3" line-height="150%">${item.quantity}</td>
<td colspan="15"><span class="itemname">${item.item}</span></td>
<td align="right" colspan="4">${item.rate}</td>
<td align="right" colspan="4">${item.amount}</td>
</tr>
<#assign desclines = item.description?split("<br />") />
<#list desclines as description>
<tr>
<td style="padding:1px 2px" align="center" colspan="3"> </td>
<td style="padding:1px 2px" colspan="15">${description}</td>
<td style="padding:1px 2px" align="right" colspan="4"></td>
<td style="padding:1px 2px" align="right" colspan="4"></td>
</tr>
</#list>
<#else>
<tr>
<td align="center" colspan="3" line-height="150%">${item.quantity}</td>
<td colspan="15"><span class="itemname">${item.item}</span><br />${item.description}</td>
<td align="right" colspan="4">${item.rate}</td>
<td align="right" colspan="4">${item.amount}</td>
</tr>
</#if>
</#list>
<!-- end items -->
</table>
scottvonduhn
03/06/2024, 2:29 PMStefan Reeder
03/06/2024, 10:10 PMscottvonduhn
03/07/2024, 4:43 PMStefan Reeder
03/08/2024, 1:20 AM