<div class="table-responsive">
<table id="defaultDataTable" class="display table table-striped table-bordered">
<thead>
<tr>
<th class="text-center" width="5%">N°</th>
<th>Designation</th>
<th>Date d'échéance</th>
<th class="text-center">Montant</th>
<th class="text-center">Mt payé</th>
<th class="text-center">Mt imputation</th>
</tr>
</thead>
<tbody>
{% for accounting_student_registration_fee in student_registration_fees %}
{# {% if accounting_student_registration_fee.fee.establishment == app.user.establishment %} #}
{% if not accounting_student_registration_fee.isArchived %}
{% set loop_index = 1 %}
{% for accounting_student_registration_fee_shedul in accounting_student_registration_fee.accountingStudentRegistrationFeeSheduls %}
{% if accounting_student_registration_fee_shedul.amountRest > 0 %}
<tr>
<td class="text-center">{{ accounting_student_registration_fee_shedul.orderNum }}</td>
<td>{{ accounting_student_registration_fee.label }}</td>
<td>{{ accounting_student_registration_fee_shedul.dateDue ? accounting_student_registration_fee_shedul.dateDue|date('d/m/Y') }}</td>
<td class="text-center">{{ accounting_student_registration_fee_shedul.amount|number_format(0, ',', ' ') }}</td>
<td class="text-center">{{ accounting_student_registration_fee_shedul.amountPaid|number_format(0, ',', ' ') }}</td>
<td class="text-center">
{% if loop_index <= 1 %}
<form method="POST" class="form form-inline text-center">
<input type="number" name="_shedul_payment" class="form-control" min="5" value="{{ accounting_student_registration_fee_shedul.amountRest }}"/>
<input type="hidden" name="_submitting" value="{{ app.user.username }}" />
<input type="hidden" name="_feeId" value="{{ accounting_student_registration_fee_shedul.id }}" />
<button type="submit" class="btn btn-primary"><i class="fa fa-save"></i></button>
</form>
{% endif %}
</td>
</tr>
{% set loop_index = loop_index + 1 %}
{% endif %}
{% endfor %}
{% endif %}
{# {% endif %} #}
{% endfor %}
</tbody>
</table>
</div>