Basiscally we have a freemarker form (netsuite calls it Advanced PDF) for a Packing List. It displays the items shipped, with quantity ordered, quantity shipped, and quantity backordered - easy. Keep in mind, it needs to respect previous shipments, so it doesn't displays items already fulfilled. The problem is, in the process of excluding previous shipments, it excludes backordered items which haven't been shipped yet, and we would like these to display as X ordered, 0 shipped, X backordered.
Have a look at the segment below - so far I've tried adding an #elseif for when quantitybackorder+quantitycommitted gt 0, but this literally repeats each line on the fulfillment by the number of lines on the order, which is strange (ie. 8 lines ordered, 2 fulfilled- those 2 will repeat 8 times each, with each set of data on its own line)
<#if record.item?has_content>
<table class="itemtable"><!-- start items -->
<#list record.item as item>
<#if item_index==0>
<thead>
<tr>
<th colspan="5" style="align: left;"><span style="font-size:12px;">Item Number</span></th>
<th colspan="12" style="align: left;"><span style="font-size:12px;">Item Description</span></th>
<th colspan="3"><span style="font-size:12px;">Ordered</span></th>
<th colspan="3"><span style="font-size:12px;">Backorder</span></th>
<th colspan="3"><span style="font-size:12px;">Shipped</span></th>
<th colspan="2"><span style="font-size:12px;">Unit</span></th>
</tr>
</thead>
</#if>
<#list salesorder.item as tranline>
<#if tranline.custcol_item_code==item.item>
<tr>
<td colspan="5"><p style="text-align: left;">${item.item}</p></td>
<td colspan="12"><p style="text-align: left;"><span style="font-weight: bold; line-height: 18px;">${item.description}</span><br /><em>${tranline.custcol_extra_details}</em></p></td>
<td colspan="3" style="align: center;">${tranline.quantity}</td>
<td colspan="3" style="align: center;">${tranline.quantitybackordered+tranline.quantitycommitted}</td>
<td colspan="3" style="align: center;">${item.quantity}</td>
<td colspan="2" style="align: center;">${tranline.units}</td>
</tr>
</#if>
</#list>
</#list>
<!-- end items --></table>
</#if>
Does anyone have any idea how I can allow for backordered items here, or looking at it another way, just exclude the already fulfilled items leaving current fulfillment and backorders? Thanks very much for your help!
Aucun commentaire:
Enregistrer un commentaire