Ron
10/30/2024, 12:49 PMCeligo AI
10/30/2024, 12:49 PMAI generated answer (using internal Slack threads):To reorder the lines or records on the printed Bill of Material (BOM), you would need to customize the Advanced PDF/HTML template used for printing the BOM. This can be done by manipulating the line item data in the Freemarker (the language used in Advanced PDF/HTML templates) loop that iterates over the line items. Here is a sample code snippet from a conversation that shows how to manipulate line items in an Advanced PDF/HTML template:
html
<#list salesorder.item as tranline><tr>
<#if tranline.custcol_itemtype = ‘Kit/Package’>
<td colspan=“12”><span class=“itemname”>${salesorder.item[0].item@label}</span><br />${tranline.description}</td>
<#elseif tranline.custcol_itemtype !=‘Kit/Package’>
<td colspan=“12”><span class=“itemname”>${tranline.item}</span><br />${tranline.description}</td>
</#elseif>
</#if>
<td colspan=“12”><span class=“itemname”>${tranline.item}</span><br />${tranline.description}</td>
<td colspan=“3”>${tranline.options}</td>
<td align=“right” colspan=“4”>${tranline.quantityordered}</td>
<td align=“right” colspan=“4”>${tranline.quantityremaining}</td>
<td align=“right” colspan=“4”>${tranline.quantity}</td>
</tr>
</#list></table>
In this code, the <#list salesorder.item as tranline>
loop is iterating over each line item in the sales order. You can modify this loop to reorder the line items based on your specific requirements.
Please note that this requires a good understanding of Freemarker and the data structure of the line items in NetSuite. Also, be aware that any changes to the template will affect all BOMs printed using that template.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
10/30/2024, 12:50 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.812116921
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.81054908
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.807198703
Celigo AI
10/30/2024, 12:50 PM