@extends('front.layout.app') @section('content')
@include('front.plan_media.partials.header') @if(session('selection_saved') || session('selection_unchanged'))

@if(session('selection_saved')) Votre sélection a bien été enregistrée. Nous prendrons rapidement contact pour vous donner les modalités. @else Votre sélection a bien été enregistrée. @endif

@endif
Mettre à jour mon plan média
@foreach($periodList as $period) @endforeach @php $grandTotal = 0; @endphp @foreach($proposal->operations as $operation) @php $selectPeriod = $operation->pivot->select_period ? json_decode($operation->pivot->select_period, true) : []; $unitPrice = $operation->pivot->discount_price ?: $operation->technical_cost; $count = 0; @endphp @foreach($periodList as $period) @endforeach @endforeach
Média Type Nb Lecteur Val. Dotation {{ ucfirst(\Carbon\Carbon::parse($period . '-01')->locale('fr')->shortMonthName) }} {{ \Carbon\Carbon::parse($period . '-01')->format('Y') }} Frais Tech. Sous total
{{ $operation->media?->name }} @if($operation->media?->type) {{ $operation->media->type->name }} @endif {{ number_format((int) ($operation->media?->readers?->content ?? 0), 0, ',', ' ') }} {{ $operation->amount > 0 ? number_format($operation->amount, 2, ',', ' ') . ' €' : '-' }} @if(in_array($period, $selectPeriod, true)) @php $count++; @endphp @endif {{ number_format($unitPrice, 2, ',', ' ') }} € @php $subtotal = $count * $unitPrice; $grandTotal += $subtotal; @endphp {{ number_format($subtotal, 2, ',', ' ') }} €
Total {{ number_format($grandTotal, 2, ',', ' ') }} €
@endsection