<div class="modal" role="dialog" id="sepa">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">SEPA POUR {% if company is defined and company %}{{ company.name }}{% endif %}</h5>
<div class="liste-mass">
</div>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<form name="form-sepa" method="POST">
<div>
Mode de règlement
<select name="payment-method" class="form-control" readonly="readonly">
<option value="sepa" selected>SEPA</option>
</select>
</div>
<div>
Date de règlement
<input id="payment-date" type="text" class="form-control flatpicker" name="date" value="{{ "now"|date("d-m-Y") }}"/>
</div>
<div>
Réference de règlement
<input type="text" class="form-control" name="reference" value="{% if company is defined and company %}{{ "now"|date("d-m-Y") }}_{{ company }}_PREL{% endif %}"/>
</div>
<table class="table table-hover" id="sample-table-1">
<thead>
<tr>
<th>Numéro facture</th>
<th>Société</th>
<th>Date</th>
<th>Nom du client</th>
<th>Solde</th>
<th>Montant réglement</th>
</tr>
</thead>
<tbody>
{% for billing in billingsSEPA %}
{% if billing.solde and billing.solde > 0 %}
{% if billing.client and billing.client.billingInfos and billing.client.billingInfos.payMode == 'sepa' %}
<tr>
<td>{{ billing.code }}</td>
<td>{{ billing.company }}</td>
<td>{{ billing.dateBilling|date('d/m/Y') }}</td>
<td>
{% if billing.client %}
{{ billing.client.firstname }} {{ billing.client.lastname }}
{% endif %}
</td>
<td> {{ billing.solde }}</td>
<td>
<input type="text" name="encaissement[{{ billing.id }}]" value="{{ billing.solde }}">
</td>
</tr>
{% endif %}
{% endif %}
{% endfor %}
</tbody>
</table>
<div class="text-center">
<input type="hidden" name="company" value="{% if company is defined and company %}{{ company.id }}{% endif %}">
<button type="submit" class="btn btn-primary">Fichier SEPA</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">Fermer</button>
</div>
</form>
</div>
</div>
</div>
</div>