<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>Facture {{ factureId }}</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
body {
font-family: Helvetica, Arial, sans-serif;
font-size: 14px;
background: #fff;
color: #333;
}
.print-container {
width: 100%;
margin: 0 auto;
}
.header-space {
height: 150px;
width: 100%;
}
.client-info {
float: right;
width: 45%;
border: 1px solid #ddd;
padding: 15px;
border-radius: 5px;
margin-bottom: 30px;
background-color: #f9f9f9;
}
.invoice-details {
margin-bottom: 20px;
clear: both;
}
table {
width: 100%;
border-collapse: collapse;
margin-bottom: 20px;
}
th, td {
border: 1px solid #dee2e6;
padding: 10px;
text-align: left;
vertical-align: top;
}
th {
background-color: #f8f9fa;
font-weight: bold;
}
.text-end {
text-align: right;
}
.amount-words {
margin-top: 30px;
font-style: italic;
font-weight: bold;
background-color: #f8f9fa;
padding: 10px;
border: 1px solid #dee2e6;
}
/* Custom Colors */
h2 { color: #005849; margin-top: 0; }
.clearfix::after {
content: "";
clear: both;
display: table;
}
</style>
</head>
<body>
<div class="print-container">
<div class="header-space"></div>
<div class="clearfix">
<div class="client-info">
<h5>Client</h5>
<p>
{% if facture.inscription.candidat.type == 1 %}
<strong>{{nom}} {{prenom}}</strong><br>
{{adresse}}<br>
{{zip}} {{ville}}<br>
{{tel}}
{% else %}
<strong>{{facture.inscription.candidat.organization.nom}}</strong><br>
Matricule Fiscale: {{facture.inscription.candidat.organization.matriculeFiscale}}<br>
{{facture.inscription.candidat.organization.telephone}}<br><br>
Participant(e): {{nom}} {{prenom}}
{% endif %}
</p>
</div>
</div>
<div class="invoice-details">
<h2>FACTURE N° {{factureId}}</h2>
<p>Date: {{ date|date('d/m/Y') }}</p>
</div>
<table class="table table-bordered">
<thead>
<tr>
<th>Désignation</th>
<th class="text-end">P.U. HT</th>
<th class="text-end">TVA (19%)</th>
<th class="text-end">Timbre</th>
<th class="text-end">Total TTC</th>
</tr>
</thead>
<tbody>
<tr>
<td>
Formation<br>
<small>{{session}} {{cycle}}</small>
</td>
<td class="text-end">
{{ ((facture.montant - 1) * 100 / 119) | number_format(3, ',', ' ') }}
</td>
<td class="text-end">
{{ (facture.montant - 1 - ((facture.montant - 1) * 100 / 119)) | number_format(3, ',', ' ') }}
</td>
<td class="text-end">
{{ 1 | number_format(3, ',', ' ') }}
</td>
<td class="text-end">
{{ (facture.montant + 1) | number_format(3, ',', ' ') }}
</td>
</tr>
</tbody>
<tfoot>
<tr>
<th colspan="4" class="text-end">Total HT</th>
<th class="text-end">{{ ((facture.montant - 1) * 100 / 119) | number_format(3, ',', ' ') }}</th>
</tr>
<tr>
<th colspan="4" class="text-end">Total TVA</th>
<th class="text-end">{{ (facture.montant - 1 - ((facture.montant - 1) * 100 / 119)) | number_format(3, ',', ' ') }}</th>
</tr>
<tr>
<th colspan="4" class="text-end">Timbre Fiscal</th>
<th class="text-end">{{ 1 | number_format(3, ',', ' ') }}</th>
</tr>
<tr>
<th colspan="4" class="text-end">Total TTC</th>
<th class="text-end">{{ (facture.montant + 1) | number_format(3, ',', ' ') }}</th>
</tr>
</tfoot>
</table>
<div class="amount-words">
Arrêtée la présente facture à la somme de : {{ (facture.montant + 1) | amount_to_words }}
</div>
<div class="mt-5">
<p class="text-end">
Le Gérant<br><br><br>
____________________
</p>
</div>
</div>
</body>
</html>