Inventory details in Packing slip Advanced HTML template

Hi,

 

I am unable to print line level data lot number quantity in packing slip from inventory details field which is (pop-up view) in item fulfillment.

 

Below is the data which i need

INTERNAL ID SERIAL/LOT NUMBER BIN EXPIRATION DATE QUANTITY
2525216 35322 OUT-CONT01-03 140
2525217 48 34935 OUT-CONT05-01 48

My code:

 

<tr>
<th class = “secondary” align=”left” colspan=”3″ style=”padding: 10px 6px;”>Code</th>
<th class = “secondary” align=”left” colspan=”11″ style=”padding: 10px 6px;”>Description</th>
<th class = “secondary” align=”center” colspan=”2″ style=”padding: 10px 6px;”>DG</th>
<th class = “secondary” align=”center” colspan=”5″ style=”padding: 10px 6px;”>Batch</th>
<th class = “secondary” align=”center” colspan=”3″ style=”padding: 10px 6px;”>Ea</th>
<th class = “secondary” align=”center” colspan=”3″ style=”padding: 10px 6px;”>Ctn</th>
</tr>
</thead>
</#if>
<tr>
<td align=”left” colspan=”3″>${item.itemname}</td>
<td align=”left” colspan=”11″ style=”word-wrap: normal;”><#if item.description?has_content>${item.description}<#else><#if item.custcol_kc_pdf_description?has_content>${item.custcol_kc_pdf_description}<#else>${item.custcol_kc_pdf_dispname}</#if></#if></td>
<td align=”center” colspan=”2″>${item.custcol_f5_tran_dgno}</td>
<td align=”center” colspan=”5″ style=”word-wrap: break-word;”>
<#if item.inventorydetail?has_content>
<#assign test = item.inventorydetail?split(“.”)>
<#if test?size gt 1>
<table style=”table-layout: fixed;”>
<td align=”right” colspan=”4″>${item.inventorydetail}</td>
<#assign batch = item.inventorydetail?split(‘,’)[0]>
<#assign qty = item.inventorydetail?split(‘,’)[1]?split(‘(‘)[1]?split(‘)’)[0]>
<tr style=”padding: 0px; margin: 0px;”>
<td align=”center” style=”padding: 0px; margin: 0px; word-wrap: break-word;”>${batch} x ${qty}</td>

</tr>
</table>
</#if>
</#if>
</td>

 

Under batch i am getting only 1st line.

35322 * 140

 

Please help me i  am struggling since many days to figure out the right script

 

Thanks

Rookie Asked on March 18, 2021 in How To's.
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   Limebox   Become a Sponsor