This example will calculate the correct amount based on the amount of claims present.
{# data1 = number of claims #}
{% set lowerboundry = 0 %}
{% set upperboundry = 15 %}
{% if data1 <= lowerboundry %}
{% set doNotGenerate = true %}
{% elseif (lowerboundry < data1 and data1 <= upperboundry) %}
{% set amount = chargeSheet.amount * data1 %}
{% else %}
{% set amount = chargeSheet.amount * (upperboundry - lowerboundry) %}
{% endif %} |