@extends('admin.layout') @section('title', __("Fiche d'intervention")) @section('content') @php // Lignes à afficher : la saisie renvoyée après une erreur de // validation d'abord, sinon celles de la fiche. $lignes = old('lignes', $fiche->lignes->map(fn ($l) => [ 'produit_id' => $l->produit_id, 'code' => $l->code, 'libelle' => $l->libelle, 'prix_unitaire_ht' => (float) $l->prix_unitaire_ht, 'quantite' => $l->quantite, ])->all()); $technicien = $fiche->user ?? auth()->user(); $action = $fiche->exists ? route('fiche_interventions.update', $fiche) : route('fiche_interventions.store', $fiche->intervention_id); @endphp

@yield('title')

{{-- Le PDF de ce qui est enregistré, pas de la saisie en cours. --}} @if ($fiche->exists) {{ __('PDF') }} @endif {{ __('Intervention #:id', ['id' => $fiche->intervention_id]) }}
@if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
@csrf @if ($fiche->exists) @method('PUT') @endif {{-- Client : figé sur la fiche à sa création --}}
{{ $fiche->client_nom ?? '—' }}
{{ $fiche->client_adresse }}
{{ $fiche->client_code_postal }} {{ $fiche->client_ville }}
{{ __('Technicien') }}
{{ trim(($technicien->prenom ?? '') . ' ' . ($technicien->nom ?? '')) }}
{{-- Pièces --}}
{{ __('Pièces') }} {{ __('Qté · PU HT · Total') }}
{{-- Main d'œuvre --}}
@if ($calcul) @endif
€ HT
{{-- TVA et totaux --}}
{{ __('TVA') }}
@foreach ($tauxTva as $taux) taux_tva) === $taux)> @endforeach
{{ __('Total HT') }}
{{ __('TVA') }} %
{{ __('Total TTC') }}
{{-- Règlement --}}
{{ __('Mode de règlement') }}
@foreach ($modes as $code => $libelle) mode_reglement) === $code)> @endforeach
{{-- Signature --}}
{{ __('Bon pour accord le :date · signature du client', ['date' => now()->format('d/m/Y')]) }} @if ($fiche->signature)
{{ __('Signée le :date. Signer à nouveau remplace cette signature.', ['date' => $fiche->signee_le?->format('d/m/Y')]) }}
@endif
@if ($fiche->exists)
@csrf @method('DELETE')
@endif
@push('scripts') @endpush @endsection