nyavokevin 9cbc1bcbdb feat(ui): add price lists and group-based quote flows
Add price list management across the API, store, services, routes,
navigation, and sales views.

Support quotes for either a client or a client group, including PDF
download and nullable client validation for group-based recipients.

Extend client groups to manage assigned clients directly from the form
and detail views, and refresh supplier, intervention, stock, and order
screens with updated interactions and layouts.
2026-04-02 12:07:11 +03:00

76 lines
3.6 KiB
PHP

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Devis {{ $quote->reference }}</title>
<style>
body { font-family: 'Helvetica', 'Arial', sans-serif; color: #333; line-height: 1.5; }
.header { margin-bottom: 30px; border-bottom: 2px solid #5d8a66; padding-bottom: 10px; }
.company-info { float: left; width: 50%; }
.client-info { float: right; width: 40%; text-align: right; }
.clear { clear: both; }
.title { font-size: 24px; color: #5d8a66; margin-bottom: 20px; text-transform: uppercase; }
.details-table { width: 100%; border-collapse: collapse; margin-top: 30px; }
.details-table th { background-color: #5d8a66; color: white; padding: 10px; text-align: left; }
.details-table td { padding: 10px; border-bottom: 1px solid #eee; }
.totals { float: right; width: 30%; margin-top: 20px; }
.totals-row { display: block; text-align: right; padding: 5px 0; }
.totals-row.grand-total { font-weight: bold; border-top: 2px solid #5d8a66; margin-top: 10px; padding-top: 10px; color: #5d8a66; font-size: 18px; }
.footer { position: fixed; bottom: 0; width: 100%; text-align: center; font-size: 10px; color: #777; border-top: 1px solid #eee; padding-top: 10px; }
</style>
</head>
<body>
<div class="header">
<div class="company-info">
<h1>THANASOFT</h1>
<p>Solutions de gestion funéraire</p>
</div>
<div class="client-info">
<h3>{{ $quote->client ? 'CLIENT' : 'GROUPE CLIENT' }}</h3>
<p><strong>{{ $quote->client?->name ?? $quote->group?->name ?? 'Destinataire inconnu' }}</strong></p>
@if($quote->client)
<p>{{ $quote->client->billing_address_line1 }}</p>
<p>{{ $quote->client->billing_postal_code }} {{ $quote->client->billing_city }}</p>
@endif
</div>
<div class="clear"></div>
</div>
<div class="title">Devis : {{ $quote->reference }}</div>
<p>Date : {{ $quote->quote_date->format('d/m/Y') }}<br>
Valable jusqu'au : {{ $quote->valid_until?->format('d/m/Y') ?? 'Non definie' }}</p>
<table class="details-table">
<thead>
<tr>
<th>Description</th>
<th style="text-align: right;">Quantité</th>
<th style="text-align: right;">Prix Unitaire</th>
<th style="text-align: right;">Total HT</th>
</tr>
</thead>
<tbody>
@foreach($quote->lines as $line)
<tr>
<td>{{ $line->description }}</td>
<td style="text-align: right;">{{ $line->quantity ?? $line->units_qty ?? $line->qty_base ?? 0 }}</td>
<td style="text-align: right;">{{ number_format($line->unit_price, 2, ',', ' ') }} {{ $quote->currency }}</td>
<td style="text-align: right;">{{ number_format($line->total_ht, 2, ',', ' ') }} {{ $quote->currency }}</td>
</tr>
@endforeach
</tbody>
</table>
<div class="totals">
<div class="totals-row">Total HT : {{ number_format($quote->total_ht, 2, ',', ' ') }} {{ $quote->currency }}</div>
<div class="totals-row">TVA : {{ number_format($quote->total_tva, 2, ',', ' ') }} {{ $quote->currency }}</div>
<div class="totals-row grand-total">TOTAL TTC : {{ number_format($quote->total_ttc, 2, ',', ' ') }} {{ $quote->currency }}</div>
</div>
<div class="footer">
Thanasoft - SIRET: XXXXXXXXXXXXXX - TVA: FRXXXXXXXXXXX<br>
Document généré le {{ now()->format('d/m/Y H:i') }}
</div>
</body>
</html>