We are using Advanced PDF/HTML forms for Pick Tickets and we are also using the "Pick, Pack and Ship" feature which creates three stages in an item fulfillment.
We use this feature because it sometimes takes multiple attempts to complete a picking and we need to remove the picked items from the general availability or netsuite will allow the items to be picked more than once under the standar fulfillment.
We need a Quantity to Pick value that is derived from the function of item.quantitycommitted - item.quantitypicked. This will give us the net remaining quantity to pick at any given time. The problem is that although item.quanitypicked appears to be in the sales order and the records browser, it does not appear to show a value in the advanced PDF/HTML form. Hoping that I am missing something simple because the alternative is a script that is problematic for other reasons:
Here is what we are doing now, much of this was sourced from this user group:
<!--Begin ToNumber function, If doing math on data fields, this function ensures numeric values of fields-->
<#function toNumber val>
<#if val?has_content && val?length gt 0 >
<#return val?html?replace('[^0-9.]','','r')?number >
<#else>
<#return 0 >
</#if>
</#function>
<!--End ToNumber function-->
<!--Begin the qty to pick calculations - requires the toNumber Function above-->
<#assign prevPicked = toNumber(item.quantitypicked)>
<#assign qtyRemaining = toNumber(item.quantity) - prevPicked>
<#assign qtyCommitted = toNumber(item.quantitycommitted)>
<#assign qtyBackordered = toNumber(item.quantitybackordered)>
<#if (qtyRemaining gt qtyCommitted)>
<#assign qtyRemaining = qtyCommitted>
</#if>
<!--End the qty to pick calculations-->
<td align="center" colspan="3" line-height="150%">${qtyRemaining}</td>
<td align="center" colspan="3" line-height="150%">${prevPicked}</td>
No matter what I do, the item.quantitypicked value is 0 or null before the toNumber function.
Can someone confirm that this field is/or is not exposed to advanced PDF/HTML Templates? And if it is not available, any suggestions on a work around?