527e47d822
- PDF : cartouche bordé en haut à droite avec le type (Client/Fournisseur/Autre) et le nom du tiers (getCounterpartyName + getCounterpartyTypeLabel). - Écran ticket : listes Client/Fournisseur filtrées sur le site courant (param siteId[]) et rechargées au changement de site ; reset du tiers sélectionné s'il sort du périmètre du nouveau site.
101 lines
4.3 KiB
Twig
101 lines
4.3 KiB
Twig
{#
|
|
Ticket de pesée (M5 Logistique) — gabarit imprimable hydraté côté serveur puis
|
|
converti en PDF par WeighingTicketPdfRenderer (Dompdf). Cf. spec-back M5 § 2.12
|
|
/ § 4.6 (RG-5.08). Reproduit fidèlement le modèle fourni (ticket_pesee.pdf).
|
|
|
|
En-tête FIXE (logo + identité société) : le ticket ne change pas en fonction du
|
|
site (décision Tristan, ERP-192). Le logo est injecté en data-URI par le renderer
|
|
(logoSrc) ; l'identité société est en dur ci-dessous.
|
|
|
|
Contraintes Dompdf : CSS2.1 (pas de flexbox/grid), mise en page par tableaux.
|
|
Police DejaVu Sans (UTF-8 — accents FR et « ° » rendus correctement).
|
|
#}
|
|
<!DOCTYPE html>
|
|
<html lang="fr">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<style>
|
|
@page { margin: 18mm 16mm; }
|
|
|
|
* { font-family: "DejaVu Sans", sans-serif; }
|
|
|
|
body { color: #000; font-size: 10px; margin: 0; }
|
|
|
|
.logo { margin-bottom: 16px; }
|
|
.logo img { height: 100px; }
|
|
|
|
.company-name { font-weight: bold; font-size: 12px; }
|
|
.company-line { font-size: 12px; }
|
|
|
|
/* En-tête 2 colonnes (Dompdf = CSS 2.1, pas de flex/grid) : identité
|
|
société à gauche, cartouche du tiers à droite (ERP-208). */
|
|
.header { width: 100%; border-collapse: collapse; }
|
|
.header td { vertical-align: top; }
|
|
.header .h-right { text-align: right; }
|
|
.party-box { display: inline-block; border: 1px solid #000; padding: 8px 12px; min-width: 160px; text-align: left; font-weight: normal; font-size: 11px; }
|
|
.party-label { font-weight: bold; font-size: 14px; margin-bottom: 4px; }
|
|
|
|
.title { font-size: 22px; font-weight: bold; margin: 22px 0 18px; }
|
|
|
|
/* Lignes des deux pesées : tableau sans bordure, colonnes alignées. */
|
|
.weighings { border-collapse: collapse; font-size: 12px; }
|
|
.weighings td { vertical-align: top; white-space: nowrap; }
|
|
.weighings .c-label { width: 130px; }
|
|
.weighings .c-weight { width: 95px; }
|
|
.weighings .c-num { width: 175px; }
|
|
.weighings .c-dsd { width: auto; }
|
|
|
|
.net { font-size: 18px; font-weight: bold; margin-top: 26px; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<table class="header">
|
|
<tr>
|
|
<td>
|
|
{% if logoSrc %}
|
|
<div class="logo"><img src="{{ logoSrc }}" alt="LPC LIOT"></div>
|
|
{% endif %}
|
|
<div class="company-name">SA LIOT Châtellerault</div>
|
|
<div class="company-line">Email : lpc.contacts@lpc-liot.fr</div>
|
|
<div class="company-line">RCS Châtellerault B 339 505 612</div>
|
|
</td>
|
|
{# Cartouche tiers (ERP-208) : nom du client / fournisseur / « autre ». #}
|
|
<td class="h-right">
|
|
{% if ticket.counterpartyName %}
|
|
<div class="party-box">
|
|
<div class="party-label">{{ ticket.counterpartyTypeLabel }} :</div>
|
|
{{ ticket.counterpartyName }}
|
|
</div>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<div class="title">Ticket de pesée</div>
|
|
|
|
{#
|
|
DSD de la pesée : valeur du pont en AUTO, valeur saisie par l'opérateur en
|
|
MANUAL (ERP-193). Un seul champ `dsd` dans les deux cas.
|
|
#}
|
|
{% set emptyRef = ticket.emptyDsd %}
|
|
{% set fullRef = ticket.fullDsd %}
|
|
|
|
<table class="weighings">
|
|
<tr>
|
|
<td class="c-label">Poids à vide</td>
|
|
<td class="c-weight">{{ ticket.emptyWeight is not null ? ticket.emptyWeight ~ ' kg' : '' }}</td>
|
|
<td class="c-num">N° pesée à vide</td>
|
|
<td class="c-dsd">{% if emptyRef is not null %}DSD : {{ emptyRef }}{% endif %}{% if ticket.emptyDate %} {{ ticket.emptyDate|date('d/m/Y H:i:s') }}{% endif %}</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="c-label">Poids à plein</td>
|
|
<td class="c-weight">{{ ticket.fullWeight is not null ? ticket.fullWeight ~ ' kg' : '' }}</td>
|
|
<td class="c-num">N° pesée à plein</td>
|
|
<td class="c-dsd">{% if fullRef is not null %}DSD : {{ fullRef }}{% endif %}{% if ticket.fullDate %} {{ ticket.fullDate|date('d/m/Y H:i:s') }}{% endif %}</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<div class="net">Poids : {{ ticket.netWeight is not null ? ticket.netWeight ~ ' kg' : '—' }}</div>
|
|
</body>
|
|
</html>
|