Initial commit with contrats and domaines modules
This commit is contained in:
143
resources/views/pdf/commande.blade.php
Normal file
143
resources/views/pdf/commande.blade.php
Normal file
@@ -0,0 +1,143 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Commande {{ $commande->numero_commande }}</title>
|
||||
<style>
|
||||
body { font-family: 'Helvetica Neue', 'Helvetica', Arial, sans-serif; font-size: 14px; color: #333; }
|
||||
.header { text-align: center; margin-bottom: 30px; }
|
||||
.header h1 { margin: 0; font-size: 24px; color: #111; }
|
||||
.header p { margin: 5px 0 0; color: #666; }
|
||||
.info-section { width: 100%; margin-bottom: 20px; }
|
||||
.info-section td { vertical-align: top; width: 50%; }
|
||||
.box { border: 1px solid #ddd; padding: 15px; border-radius: 4px; background: #fafafa; }
|
||||
.box strong { display: block; margin-bottom: 5px; color: #555; }
|
||||
.table-items { width: 100%; border-collapse: collapse; margin-bottom: 30px; }
|
||||
.table-items th, .table-items td { border: 1px solid #ddd; padding: 10px; text-align: left; }
|
||||
.table-items th { background-color: #f5f5f5; font-weight: bold; font-size: 12px; }
|
||||
.table-items td { font-size: 13px; }
|
||||
.table-items .text-right { text-align: right; }
|
||||
.totals { width: 100%; }
|
||||
.totals td { padding: 5px 10px; text-align: right; }
|
||||
.totals .bold { font-weight: bold; font-size: 16px; }
|
||||
.footer { margin-top: 50px; page-break-inside: avoid; }
|
||||
.signature-box { width: 100%; border-collapse: collapse; }
|
||||
.signature-box td { width: 50%; padding: 10px; text-align: left; vertical-align: top; }
|
||||
.signature { border: 1px solid #333; height: 120px; padding: 10px; }
|
||||
.signature p { margin: 0; font-weight: bold; font-size: 13px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<h1>BON DE COMMANDE : {{ $commande->numero_commande }}</h1>
|
||||
<p>Objet : {{ $commande->objet }}</p>
|
||||
</div>
|
||||
|
||||
<table class="info-section">
|
||||
<tr>
|
||||
<td style="padding-right: 10px;">
|
||||
<div class="box">
|
||||
<strong>Service Demandeur</strong>
|
||||
{{ $commande->service->nom ?? 'N/A' }}<br>
|
||||
Demandé par : {{ $commande->demandeur->name ?? 'N/A' }}<br>
|
||||
Le : {{ $commande->date_demande ? \Carbon\Carbon::parse($commande->date_demande)->format('d/m/Y') : 'N/A' }}
|
||||
</div>
|
||||
</td>
|
||||
<td style="padding-left: 10px;">
|
||||
<div class="box">
|
||||
<strong>Informations Fournisseur</strong>
|
||||
{{ $commande->fournisseur->nom ?? 'N/A' }}<br>
|
||||
Réf : {{ $commande->reference_fournisseur ?? 'N/A' }}<br>
|
||||
<br>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table style="width: 100%; margin-bottom: 20px;">
|
||||
<tr>
|
||||
@if($commande->imputation_budgetaire)
|
||||
<td style="width: 50%; padding-right: 10px;">
|
||||
<div class="box">
|
||||
<strong>Imputation budgétaire :</strong>
|
||||
{{ $commande->imputation_budgetaire }}
|
||||
</div>
|
||||
</td>
|
||||
@endif
|
||||
@if($commande->date_souhaitee)
|
||||
<td style="width: 50%; padding-left: {{ $commande->imputation_budgetaire ? '10px' : '0' }};">
|
||||
<div class="box">
|
||||
<strong>Date de livraison souhaitée :</strong>
|
||||
{{ \Carbon\Carbon::parse($commande->date_souhaitee)->format('d/m/Y') }}
|
||||
</div>
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class="table-items">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Désignation</th>
|
||||
<th>Réf. Article</th>
|
||||
<th class="text-right">Qté</th>
|
||||
<th class="text-right">PU HT</th>
|
||||
<th class="text-right">Total HT</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($commande->lignes as $ligne)
|
||||
<tr>
|
||||
<td>{{ $ligne->designation }}</td>
|
||||
<td>{{ $ligne->reference ?? '-' }}</td>
|
||||
<td class="text-right">{{ number_format($ligne->quantite, 2, ',', ' ') }} {{ $ligne->unite }}</td>
|
||||
<td class="text-right">{{ number_format($ligne->prix_unitaire_ht, 2, ',', ' ') }} €</td>
|
||||
<td class="text-right">{{ number_format($ligne->quantite * $ligne->prix_unitaire_ht, 2, ',', ' ') }} €</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<td style="width: 50%; vertical-align: top;">
|
||||
@if($commande->justification || $commande->description)
|
||||
<div class="box" style="margin-right: 20px; min-height: 50px;">
|
||||
<strong>Notes / Justification :</strong>
|
||||
<p style="font-size: 12px; margin-top:5px;">{{ $commande->justification ?: $commande->description }}</p>
|
||||
</div>
|
||||
@endif
|
||||
</td>
|
||||
<td style="width: 50%; vertical-align: top;">
|
||||
<table class="totals">
|
||||
<tr>
|
||||
<td>Total HT :</td>
|
||||
<td>{{ number_format($commande->montant_ht, 2, ',', ' ') }} €</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bold">Total TTC :</td>
|
||||
<td class="bold">{{ number_format($commande->montant_ttc, 2, ',', ' ') }} €</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="footer">
|
||||
<table class="signature-box">
|
||||
<tr>
|
||||
<td>
|
||||
<div class="signature">
|
||||
<p>Date :</p>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="signature">
|
||||
<p>Bon pour accord (Signature) :</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user