feat: infrastructure assets management with warranty tracking and EAN lookup integration
This commit is contained in:
@@ -2,142 +2,287 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Commande {{ $commande->numero_commande }}</title>
|
||||
<title>Proposition de 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; }
|
||||
@page {
|
||||
margin: 0cm 0cm;
|
||||
}
|
||||
body {
|
||||
font-family: 'Helvetica', Arial, sans-serif;
|
||||
font-size: 11pt;
|
||||
color: #333;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.header-stripe {
|
||||
background-color: #2c3e50;
|
||||
height: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
.container {
|
||||
padding: 40px;
|
||||
}
|
||||
.header {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
.logo-container {
|
||||
float: left;
|
||||
width: 50%;
|
||||
}
|
||||
.order-meta {
|
||||
float: right;
|
||||
width: 50%;
|
||||
text-align: right;
|
||||
}
|
||||
.order-meta h1 {
|
||||
margin: 0;
|
||||
font-size: 18pt;
|
||||
color: #2c3e50;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.order-meta p {
|
||||
margin: 5px 0 0;
|
||||
color: #7f8c8d;
|
||||
font-weight: bold;
|
||||
}
|
||||
.clearfix::after {
|
||||
content: "";
|
||||
clear: both;
|
||||
display: table;
|
||||
}
|
||||
.info-grid {
|
||||
width: 100%;
|
||||
margin-bottom: 40px;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.info-grid td {
|
||||
vertical-align: top;
|
||||
width: 50%;
|
||||
}
|
||||
.info-box {
|
||||
padding: 0 10px;
|
||||
}
|
||||
.info-box h3 {
|
||||
font-size: 10pt;
|
||||
text-transform: uppercase;
|
||||
color: #34495e;
|
||||
border-bottom: 2px solid #ecf0f1;
|
||||
padding-bottom: 5px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.info-content {
|
||||
line-height: 1.5;
|
||||
}
|
||||
.info-content strong {
|
||||
color: #2c3e50;
|
||||
}
|
||||
.table-items {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.table-items th {
|
||||
background-color: #f8f9fa;
|
||||
color: #2c3e50;
|
||||
text-transform: uppercase;
|
||||
font-size: 9pt;
|
||||
padding: 12px 10px;
|
||||
border-bottom: 2px solid #dee2e6;
|
||||
text-align: left;
|
||||
}
|
||||
.table-items td {
|
||||
padding: 12px 10px;
|
||||
border-bottom: 1px solid #eee;
|
||||
font-size: 10pt;
|
||||
}
|
||||
.text-right { text-align: right !important; }
|
||||
.text-center { text-align: center !important; }
|
||||
|
||||
.summary-container {
|
||||
width: 100%;
|
||||
}
|
||||
.summary-notes {
|
||||
float: left;
|
||||
width: 55%;
|
||||
}
|
||||
.summary-totals {
|
||||
float: right;
|
||||
width: 40%;
|
||||
}
|
||||
.summary-totals table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.summary-totals td {
|
||||
padding: 8px 10px;
|
||||
}
|
||||
.summary-totals tr.grand-total {
|
||||
background-color: #f8f9fa;
|
||||
font-weight: bold;
|
||||
font-size: 13pt;
|
||||
color: #2c3e50;
|
||||
}
|
||||
.notes-box {
|
||||
padding: 15px;
|
||||
background-color: #fdfdfd;
|
||||
border-left: 4px solid #bdc3c7;
|
||||
font-style: italic;
|
||||
font-size: 10pt;
|
||||
}
|
||||
.footer-signatures {
|
||||
margin-top: 60px;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
.signature-table {
|
||||
width: 100%;
|
||||
border-collapse: separate;
|
||||
border-spacing: 20px 0;
|
||||
}
|
||||
.signature-table td {
|
||||
width: 50%;
|
||||
border: 1px dashed #bdc3c7;
|
||||
padding: 15px;
|
||||
height: 120px;
|
||||
vertical-align: top;
|
||||
}
|
||||
.signature-table p {
|
||||
margin: 0;
|
||||
font-weight: bold;
|
||||
font-size: 9pt;
|
||||
color: #7f8c8d;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.watermark {
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
right: 40px;
|
||||
font-size: 8pt;
|
||||
color: #bdc3c7;
|
||||
}
|
||||
</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 class="header-stripe"></div>
|
||||
|
||||
<div class="container">
|
||||
<div class="header clearfix">
|
||||
<div class="logo-container">
|
||||
<img src="{{ public_path('images/logo_agglo.png') }}" style="height: 70px;">
|
||||
</div>
|
||||
<div class="order-meta">
|
||||
<h1>Proposition de commande</h1>
|
||||
<p>N° {{ $commande->numero_commande }}</p>
|
||||
<div style="margin-top: 10px; font-size: 10pt; color: #333;">
|
||||
Date: {{ \Carbon\Carbon::parse($commande->date_demande)->format('d/m/Y') }}<br>
|
||||
Objet: {{ $commande->objet }}
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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">
|
||||
<table class="info-grid">
|
||||
<tr>
|
||||
<td>
|
||||
<div class="signature">
|
||||
<p>Date :</p>
|
||||
<div class="info-box">
|
||||
<h3>Émetteur / Service</h3>
|
||||
<div class="info-content">
|
||||
<strong>{{ $commande->service->nom ?? 'Service Administratif' }}</strong><br>
|
||||
@if($commande->commune)
|
||||
{{ $commande->commune->nom }} ({{ $commande->commune->code_postal }})<br>
|
||||
@endif
|
||||
<span style="font-size: 9pt; color: #7f8c8d;">Demandé par: {{ $commande->demandeur->name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="signature">
|
||||
<p>Bon pour accord (Signature) :</p>
|
||||
<div class="info-box">
|
||||
<h3>Fournisseur</h3>
|
||||
<div class="info-content">
|
||||
<strong>{{ $commande->fournisseur->nom ?? 'Non spécifié' }}</strong><br>
|
||||
@if($commande->reference_fournisseur)
|
||||
<span style="font-size: 9pt;">Réf. Fournisseur: {{ $commande->reference_fournisseur }}</span><br>
|
||||
@endif
|
||||
@if($commande->date_souhaitee)
|
||||
<span style="font-size: 9pt;">Livraison souhaitée: {{ \Carbon\Carbon::parse($commande->date_souhaitee)->format('d/m/Y') }}</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class="table-items">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="50%">Désignation</th>
|
||||
<th width="15%">Référence</th>
|
||||
<th width="10%" class="text-center">Qté</th>
|
||||
<th width="12%" class="text-right">P.U. HT</th>
|
||||
<th width="13%" class="text-right">Total HT</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($commande->lignes as $ligne)
|
||||
<tr>
|
||||
<td>{{ $ligne->designation }}</td>
|
||||
<td style="color: #7f8c8d; font-size: 9pt;">{{ $ligne->reference ?? '-' }}</td>
|
||||
<td class="text-center">{{ number_format($ligne->quantite, 0, ',', ' ') }}</td>
|
||||
<td class="text-right">{{ number_format($ligne->prix_unitaire_ht, 2, ',', ' ') }} €</td>
|
||||
<td class="text-right"><strong>{{ number_format($ligne->quantite * $ligne->prix_unitaire_ht, 2, ',', ' ') }} €</strong></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="summary-container clearfix">
|
||||
<div class="summary-notes">
|
||||
@if($commande->description || $commande->justification)
|
||||
<div class="info-box" style="padding: 0;">
|
||||
<h3>Notes & Informations</h3>
|
||||
<div class="notes-box">
|
||||
{{ $commande->description ?: $commande->justification }}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<div class="summary-totals">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="text-right">Sous-total HT :</td>
|
||||
<td class="text-right">{{ number_format($commande->montant_ht, 2, ',', ' ') }} €</td>
|
||||
</tr>
|
||||
@php
|
||||
$tva = $commande->montant_ttc - $commande->montant_ht;
|
||||
@endphp
|
||||
@if($tva > 0)
|
||||
<tr>
|
||||
<td class="text-right">TVA :</td>
|
||||
<td class="text-right">{{ number_format($tva, 2, ',', ' ') }} €</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr class="grand-total">
|
||||
<td class="text-right">TOTAL TTC :</td>
|
||||
<td class="text-right">{{ number_format($commande->montant_ttc, 2, ',', ' ') }} €</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer-signatures">
|
||||
<table class="signature-table">
|
||||
<tr>
|
||||
<td>
|
||||
<p>Date & Signature Demandeur</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>Bon pour accord (Direction / Élu)</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="watermark">
|
||||
DSICommander - Généré le {{ now()->format('d/m/Y H:i') }}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user