Print Tax Rate any list object in jinja template - jigneshpshah/greycube_helpmanual GitHub Wiki

First Check is the list is not empty , if not empty print the first object as below

<div>PRICE : IN SINGAPORE DOLLARS &amp; SUBJECT TO {% if not taxes: %} 0 {%else%} {{taxes[0].rate}}{%endif%}% GST<br></div>

Result would be either of the below

  1. PRICE : IN SINGAPORE DOLLARS & SUBJECT TO 0 % GST

  2. PRICE : IN SINGAPORE DOLLARS & SUBJECT TO 7 % GST

⚠️ **GitHub.com Fallback** ⚠️