{{-- Fiche commande, à l'image de la fiche client (client/form.blade.php). Mêmes champs, mêmes id / name, mêmes onglets, mêmes boutons : le script (commande.form_script) et l'enregistrement (commande_controller::enregistrer) sont séparés de la vue. Les parties incluses (client, chantier, contact, centrale, formule, véhicule, complément, onglets, tableaux) sont reprises telles quelles et seulement rhabillées par le CSS ci-dessous. --}}
{{-- dt-moderne : tous les tableaux de la fiche prennent le style de la grille clients v2 (inc/css/style.css) --}}
@csrf

Commande

@if($commande->id_commande) {{$commande_code}}@if($commande->lier_formule) - {{$commande->lier_formule->formule_code}}@endif {{$commande->lier_client?->client_nom}}@if($commande->lier_chantier) · {{$commande->lier_chantier->chantier_nom}}@endif @if($commande->commande_date_livraison) · {{\Carbon\Carbon::parse($commande->commande_date_livraison)->format('d/m/Y')}}@endif @else Nouvelle commande @endif
{{-- Mêmes boutons que la fiche actuelle : texte et couleur basculés par le choix Complète / Ordre de fab (form_script) --}}
Identification
@if(env('BHP')) {{-- Mode BHP : toujours complète, choix Complète / Ordre de fab masqué --}} @else
@endif
Livraison
@include('commande.commande_client') @include('commande.commande_chantier') @include('commande.commande_centrale') @include('commande.commande_formule')
Quantité
@include('commande.commande_quantite')
@include('commande.commande_date_livraison')
@include('commande.commande_onglet_options')
@include('commande.commande_onglet_chantier_diffus')
@include('commande.commande_onglet_divers')
@include('commande.commande_onglet_information')
@include('commande.commande_onglet_type_vehicule')
@include('commande.commande_onglet_liste_info')
@include('commande.commande_onglet_incident')
@include('commande.commande_formulaire_ligne_commande')
@include('commande.commande_ligne_commande_table', ['tri_type_article' => true]) {{-- lignes regroupées par type : formule, service, ajout, produit, zone --}}
@if($commande->id_commande) @include('fiche_annexe.table_bl_fiche_annexe',['type_fiche_annexe'=>'commande','id_fiche_annexe'=>$commande->id_commande]) @endif
@if($commande->id_commande) @include('fiche_annexe.table_planning_fiche_annexe',['type_fiche_annexe'=>'commande','id_fiche_annexe'=>$commande->id_commande]) @endif
@if($commande->id_commande) @include('fiche_annexe.table_envoi_mail_fiche_annexe',['type_fiche_annexe'=>'commande','id_fiche_annexe'=>$commande->id_commande]) @endif
@if($commande->id_commande) @include('fiche_annexe.table_envoi_sms_fiche_annexe',['type_fiche_annexe'=>'commande','id_fiche_annexe'=>$commande->id_commande]) @endif
{{-- Totaux en bas à droite, comme la fiche actuelle, remplis par le tableau des lignes (commande_ligne_commande_table) --}}
Total HT

Total TVA

Total TTC

{{-- Mêmes boutons, mêmes id que la fiche actuelle ; Valider seul bouton plein --}}
@if($commande->id_commande && env('BHP')) @endif
@include('commande.form_script')