Jira Code: BLL-51
This code is used to print the Purchase Order using Advanced PDF. If the purchase order is a special purchase order & if the items are repeating then the items should be consolidated & print as a single item, Quantity, Amount should add accordingly.
<#assign totalAmount=0 totalQty=0 />
<!--Function Definition-->
<#function findConsolidatedItemData itemToFind itemArray index>
<#list itemArray as item>
<#if item.item==itemToFind.item>
<!--To get the total amount-->
<#assign totalAmount=totalAmount + item.amount />
<#assign totalQty=totalQty + item.quantity />
</#if>
</#list>
<#assign returnValue='true' />
<#return returnValue>
</#function>
<!--Function call-->
<#assign consolidatedItemData=findConsolidatedItemData(item, record.item,item_index) />