From 1913bbe4f35c037cf6deaab8ee1373d57d77c12f Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Tue, 14 May 2024 10:06:53 +0200 Subject: [PATCH] wait #6906 @1 --- app/Http/Controllers/FluidbookController.php | 13 ++++-- resources/views/order.blade.php | 44 ++++++++++++++------ 2 files changed, 41 insertions(+), 16 deletions(-) diff --git a/app/Http/Controllers/FluidbookController.php b/app/Http/Controllers/FluidbookController.php index 1ced1c8..4ba1e06 100644 --- a/app/Http/Controllers/FluidbookController.php +++ b/app/Http/Controllers/FluidbookController.php @@ -126,13 +126,19 @@ class FluidbookController extends Controller $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']; @@ -154,7 +160,6 @@ class FluidbookController extends Controller $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; diff --git a/resources/views/order.blade.php b/resources/views/order.blade.php index f026b9e..47383cb 100644 --- a/resources/views/order.blade.php +++ b/resources/views/order.blade.php @@ -1,4 +1,8 @@ - +@php + $titlesReplace=['CONDITIONNEMENT'=>'COND.','QUANTITE'=>'QTÉ'] +@endphp + + @@ -8,7 +12,8 @@ - +
-

Demande # {{$order->id}} effectuée le {{(new DateTime($order->created_at))->setTimezone(new DateTimeZone('Europe/Paris'))->format('d/m/y à H:i')}}

+

Demande # {{$order->id}} effectuée + le {{(new DateTime($order->created_at))->setTimezone(new DateTimeZone('Europe/Paris'))->format('d/m/y à H:i')}}

{{$client->firstname}} {{$client->name}}
{{$client->hospital}}

Numéro FINESS : {{$client->finess}}
@@ -54,21 +67,28 @@ @foreach($details->titles as $title) - + @endforeach @foreach($details->lines as $line) - @foreach($line as $cell) - + @foreach($line as $k=>$cell) + @endforeach @endforeach - - + + + + + + @foreach($details->totals as $k=>$v) - + + + + @endforeach
{{$title}}{{$titlesReplace[$title]??$title}}
{{$cell}}{{$cell}}
{{$k}}{{$v}}{{$k}}{{$v}}
-- 2.39.5