//Info: TPNC-785
We came into a scenario where we have to add the Promotion table data available under the Sales order to the Picking Ticket Template.
In most cases, we normally add an Item table which is followed by checking the condition,
if record.item?has_content>
What If, in cases where we have to check both the Promotion section content availability & display only the Applied ones? Let’s see how to execute this!
<#if record.promotions?has_content>
<table class="promotionstable" style="width: 100%; margin-top: 20px; border: 1.5px solid Gray;"><!-- start items --><#list record.promotions as promotions>
<#if promotions_index==0>
<thead style="border-bottom: 1.5px solid Gray;">
<tr>
<th colspan="4" style="border-right: 1.5px solid Gray;">Promotion</th>
<th colspan="3" style="border-right: 1.5px solid Gray;">Coupon Code</th>
<th colspan="3" style="border-right: 1.5px solid Gray;">Status</th>
<th colspan="3" style="border-right: 1.5px solid Gray;">Discount Item</th>
<th colspan="3" style="border-right: 1.5px solid Gray;">Rate</th>
<th colspan="3" style="border-right: 1.5px solid Gray;">Purchase Discount</th>
</tr>
</thead>
</#if>
<#if promotions.applicabilitystatus == "Applied">
<tr>
<td colspan="4" style="border-right: 1.5px solid;">${promotions.promocode}</td>
<td colspan="3" style="border-right: 1.5px solid ;">${promotions.couponcode}</td>
<td colspan="3" style="border-right: 1.5px solid;">${promotions.applicabilitystatus</td>
<td colspan="3" style="border-right: 1.5px solid;">${promotions.discount}</td>
<td colspan="3" style="border-right: 1.5px solid;">${promotions.discountrate}</td>
<td colspan="3" style="border-right: 1.5px solid;">${promotions.purchasediscount</td>
</tr>
</#if>
</#list><!-- end items -->
</table>
</#if>