{% load i18n formats %}
{% with formset=form.sub_transactions %}
{# The amount is the sum of these rows, so it's hidden while there are any. #}
{# Transfers don't take them; `type` comes from the form's _type_aware scope when it has one. #}
{{ formset.management_form }}
{% for error in formset.non_form_errors %}
{{ error }}
{% endfor %}
{% translate 'Sub-transactions' %}
{% for sub in formset %}
{% include "transactions/widgets/sub_transaction_row.html" with sub=sub %}
{% endfor %}
{% include "transactions/widgets/sub_transaction_row.html" with sub=formset.empty_form %}