{% set item = entity.instance %} {% if item.orderPayment is not null %} {{ item.orderPayment.reference }} {% else %} {{ item.reference }} {% endif %}