{% set rows = doc.other_charges_calculation.split(‘\n’) %}
{% if rows %}
<tbody>
{% for i in range(0, rows|length, 4) %}
<tr>
<td>{{ rows[i] }}</td>
<td>{{ rows[i + 1] }}</td>
<td>{{ rows[i + 2] }}</td>
<td>{{ rows[i + 3] }}</td>
</tr>
{% endfor %}
</tbody>
{% endif %}
</table>