$jd = [];
$jt = [];
foreach ($p as $k => $v) {
- if (!$k || !$v) {
+
+ if (!$k) {
+ continue;
+ }
+ $jt[] = $k;
+ $jd[] = $v;
+ if (!$v) {
continue;
}
$d[] = $k . " : " . $v;
- $jd[] = $v;
- $jt[] = $k;
+
+
}
$d[] = '--';
$d[] = 'QUANTITE : ' . $i['quantity'];
$details_json['totals'] = ['TOTAL HT' => self::formatNumber($total),
'TVA' => self::formatNumber($cumul_tva),
- 'ECOTAXE' => self::formatNumber($cumul_ecotaxe),
'TOTAL TTC' => self::formatNumber($total + $cumul_tva),
];
$details_json['titles'] = $jt;
-<!DOCTYPE html>
+@php
+ $titlesReplace=['CONDITIONNEMENT'=>'COND.','QUANTITE'=>'QTÉ']
+@endphp
+
+ <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
<!-- Fonts -->
- <link href="https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" rel="stylesheet" type="text/css">
+ <link href="https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap"
+ rel="stylesheet" type="text/css">
<!-- Styles -->
<style>
margin: 1cm;
}
}
+
html, body {
background-color: #fff;
color: #000000;
font-family: 'Source Sans 3', sans-serif;
font-weight: 400;
margin: 0;
- font-size: 3mm;
+ font-size: 2.75mm;
}
main {
}
- table{
+ table {
width: 100%;
margin-top: 30px;
}
- td, th{
+ td, th {
text-align: left;
}
+
+ [data-title="DESIGNATION"] {
+ width: 8cm;
+ }
+
+
</style>
</head>
<body>
<main>
<div style="position: absolute;top:0;right:0"><img style="width: 3cm" src="/images/logo-bastide.svg"></div>
<div>
- <h3>Demande # {{$order->id}} effectuée le {{(new DateTime($order->created_at))->setTimezone(new DateTimeZone('Europe/Paris'))->format('d/m/y à H:i')}}</h3>
+ <h3>Demande # {{$order->id}} effectuée
+ le {{(new DateTime($order->created_at))->setTimezone(new DateTimeZone('Europe/Paris'))->format('d/m/y à H:i')}}</h3>
{{$client->firstname}} {{$client->name}}<br>
{{$client->hospital}}<br><br>
Numéro FINESS : <b>{{$client->finess}}</b><br>
<table>
<tr>
@foreach($details->titles as $title)
- <th>{{$title}}</th>
+ <th data-title="{{$title}}">{{$titlesReplace[$title]??$title}}</th>
@endforeach
</tr>
@foreach($details->lines as $line)
<tr>
- @foreach($line as $cell)
- <td>{{$cell}}</td>
+ @foreach($line as $k=>$cell)
+ <td data-title="{{$details->titles[$k]}}">{{$cell}}</td>
@endforeach
</tr>
@endforeach
- <tr><td style="height:30px;border-bottom: 1px solid #000" colspan="{{count($details->titles)}}"></td></tr>
- <tr><td style="height:30px;" colspan="{{count($details->titles)}}"></td></tr>
+ <tr>
+ <td style="height:30px;border-bottom: 1px solid #000" colspan="{{count($details->titles)}}"></td>
+ </tr>
+ <tr>
+ <td style="height:30px;" colspan="{{count($details->titles)}}"></td>
+ </tr>
@foreach($details->totals as $k=>$v)
<tr>
- <td colspan="{{count($details->titles)-2}}"></td><td>{{$k}}</td><td><b>{{$v}}</b></td>
+ <td colspan="{{count($details->titles)-4}}"></td>
+ <td colspan="2" style="text-align: right;white-space: nowrap;">{{$k}}</td>
+ <td></td>
+ <td style="text-align: left;white-space: nowrap;"><b>{{$v}}</b></td>
</tr>
@endforeach
</table>