How to group and sort items in netsuite advanced pdf template?

In netsuite advanced pdf template to print sales order pdf,

I am getting output for club type and club sub type as:
Club Type  Club Sub type
Iron                    5 Iron
Putter               6 Putter
Wood                Wood 5
Wedg e            Wedge 2
Iron                    9 Iron
Wood               Wood1

Now, I want to group club type and sort club sub type within each club type group like,
Iron – 5 Iron, 9Iron
Putter – 6 Putter
Wedge – Wedge, Wedge5
Wood – Wood 1, Wood 5

Please help! Thanks in advance.

<table style=”width: 100%; margin-top: 10px;”>
<!– start items –>
<#list record.item as item>
<#if item_index==0>
<thead>
<tr>
<th align=”center” colspan=”2″><span style=”font-size:8px;”>Qty</span></th>
<th align=”center” colspan=”4″><span style=”font-size:8px;”>ITEM</span></th>
<th align=”left” colspan=”5″><span style=”font-size:8px;”>CLUB<br/>TYPE</span></th>
<th align=”left” colspan=”5″><span style=”font-size:8px;”>CLUB<br/>SUB<br/>TYPE</span></th>
<th align=”center” colspan=”10″><span style=”font-size:8px;margin-right:35px;”>HEAD</span></th>
<th align=”center” colspan=”10″><span style=”font-size:8px;margin-right:41px;”>SHAFT</span></th>
<th align=”center” colspan=”10″><span style=”font-size:8px;margin-right:45px;”>GRIP</span></th>
</tr>
</thead>
</#if>
<tr style=”background-color: ${((item_index % 2)==0)?string(‘#ffffff’, ‘#e3e3e3’)};”>
<td align=”center” colspan=”2″ line-height=”150%” style=”height: 25px;”>
<span style=”font-size:8px;”><b>${record.item.quantity}</b></span>
</td>
<td colspan=”4″ style=”height: 25px;”>
<span style=”font-size:8px;”><b>${item.item}</b></span>
</td>
<td align=”left” colspan=”5″ line-height=”150%” style=”height: 25px;”>
<span style=”font-size:8px;”><b>${item.custcol_cc_clubtype_so}</b></span>
</td>
<td align=”left” colspan=”5″ line-height=”150%” style=”height: 25px;”>
<span style=”font-size:8px;”><b>${item.custcol_cc_club_subtype_so}</b></span>
</td>
<td align=”left” colspan=”10″ style=”height: 25px;”>
<span style=”font-size:9px;”><b>${item.custcol_cc_head_description_so}</b></span>
</td>
<td align=”left” colspan=”10″ style=”height: 25px;”>
<span style=”font-size:9px;”><b>${item.custcol_cc_shaft_description_so}</b></span>
</td>
<td align=”left” colspan=”10″ style=”height: 25px;”>
<span style=”font-size:9px;”><b>${item.custcol_cc_grip_description_so}</b></span>
</td>
</tr>
</#list>
<!– end items –>
</table>

Beginner Asked on November 26, 2023 in SuiteBuilder.
Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Become a Sponsor   Become a Sponsor