Our team will enter serial numbers during the Item Fulfillment, therefore the serial numbers are not on the sales order. I am have problems displaying the Item Fulfillment serial number on an Advanced PDF / HTML Template - Packing Slip, and still getting the ordered quantity and backorder quantity from the sales order. I am trying to match lines using an index, but the problem I have is that if there is any LINE on the sale order that is a Description, Discount, Subtotal, and so on, the Index is thrown off incorrect. The below example gets the correct serial number from the Fulfillment:
<#list record.item as tranline><tr>
<td colspan="12" style="border: 0.5px;"><span class="itemname">${tranline.item}</span><br />${tranline.description}</td>
<td colspan="3" style="border: 0.5px;">${tranline.serialnumbers}</td>
<td align="right" colspan="2" style="border: 0.5px;">${salesorder.item[tranline?index].quantityordered}</td>
<td align="right" colspan="2" style="border: 0.5px;">${salesorder.item[tranline?index].quantityremaining}</td>
<td align="right" colspan="2" style="border: 0.5px;">${tranline.quantity}</td>
</tr>
</#list>
If I replace record.item with salesorder.item on the first line, I will get my correct quantity ordered, but the report will error if the sales order has any lines (items) that are descriptions, discounts, subtotals, so on. Any help would truly be appreciated!