{% extends 'base.html.twig' %}
{% block title %} Mes transactions | {{ parent() }} {% endblock %}
{% block body %}
<section class="flat-header color-bg adm-header">
<div class="wave-bg wave-bg2"></div>
<div class="container">
<div class="dasboard-wrap fl-wrap">
<div class="dasboard-breadcrumbs breadcrumbs">
<a href="{{ url('app_client_home') }}">Accueil</a><a href="#">Mon compte</a><span>Mes transactions</span>
</div>
{{ include('base-default/client-account-sidebar-with-menu.html.twig') }}
</div>
</div>
</section>
<section class="middle-padding">
<div class="container">
<div class="dasboard-wrap fl-wrap">
<div class="dashboard-content fl-wrap" style="min-height: 268px">
<div class="table-responsive">
<table class="table">
<thead class="table-blue">
<tr>
<th>Numéro</th>
<th>Montant</th>
<th>Date</th>
<th>Statut</th>
<th>Description</th>
<th>Facture</th>
</tr>
</thead>
<tbody>
{% if transactions.totalItemCount > 0 %}
{% for transaction in transactions %}
<tr>
<td>{{ transaction.transactionNumber }}</td>
<td>{{ transaction.amount | number_format(2, ',', ' ') }} €</td>
<td>{{ transaction.createdAt|date('d/m/Y à H\\hi') }}</td>
<td>
{% if transaction.status == 'succeeded' %}
<span class="badge rounded-pill badge-light-success">Complétée</span>
{% endif %}
</td>
<td>{{ transaction.description }}</td>
<td>
{% if transaction.transactionType == 'credit' %}
{% if transaction.invoice %}
<a href="{{ url('app_client_invoice', {'invoiceNumber': transaction.invoice.invoiceNumber}) }}" class="text-theme-gray text-decoration-underline td-link-facture">{{ transaction.invoice.invoiceNumber }}</a>
{% endif %}
{% else %}
-
{% endif %}
</td>
</tr>
{% endfor %}
{% else %}
<tr>
<td colspan="4">Aucune transaction trouvée.</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
<div class="mt-paginator">
{{ knp_pagination_render(transactions) }}
</div>
</div>
</div>
</div>
</section>
<div class="limit-box fl-wrap"></div>
{% endblock %}