@php use Carbon\Carbon; @endphp @php // dd(request('modifier_client')); $tab_centrale_id = $client->lier_client_centrale->pluck('id_centrale'); $position_compte_id=$client->position_compte_id??$parametre->position_compte_id; $client_mailling=$client->client_mailling??$parametre->parametre_edition_mailling; $client_blocage_credit_depasse=$client->client_blocage_credit_depasse??$parametre->parametre_bloacage_si_credit_depasse; $client_impression_pesee=$client->client_impression_pesee??$parametre->parametre_impression_pesees; $client_gachee_pleine=$client->client_gachee_pleine??$parametre->parametre_gachee_pleine; $client_imprimante_2=$client->client_imprimante_2??$parametre->parametre_imprimante_2; $client_comptant=$client->client_comptant??$parametre->parametre_client_comptant; $client_bc_obligatoire=$client->client_bc_obligatoire??$parametre->parametre_bc_obligatoir; $client_option_demat=$client->client_option_demat??$parametre->parametre_option_demat; $client_option_imp_bl_si_demat=$client->client_option_imp_bl_si_demat??$parametre->parametre_option_imp_bl_si_demat; $client_demat_bl_immediat=$client->client_demat_bl_immediat??$parametre->parametre_demat_bl_immediat; $client_mode_facturation_transport=$client->client_mode_facturation_transport??$parametre->parametre_mode_facturation_beton; $client_facturation_transport=$client->client_facturation_transport??$parametre->parametre_facturation_transport_beton; $client_facturation_transport_incomplet=$client->client_facturation_transport_incomplet??$parametre->parametre_facturation_transport_incomplet_beton; $client_facturation_immo=$client->client_facturation_immo??$parametre->parametre_immobilisation; $tps_immo_accorde=$client->tps_immo_accorde??$parametre->parametre_tps_immo_accorde; $client_transport_detaille=$client->client_transport_detaille??$parametre->parametre_transport_detaille_beton; $client_tgap=$client->client_tgap??$parametre->parametre_tgap_beton; $client_taxe_carbone_facturable=$client->client_taxe_carbone_facturable??$parametre->parametre_taxe_carbone_facturable; $client_taxe_energetique_facturable=$client->client_taxe_energetique_facturable??$parametre->parametre_taxe_energetique_facturable; $client_ecotaxe_facturable=$client->client_ecotaxe_facturable??$parametre->parametre_ecotaxe_facturable; $client_contribution_exeptionnelle_facturable=$client->client_contribution_exeptionnelle_facturable??$parametre->parametre_contribution_exeptionnelle_facturable; $client_mode_facturation_transport_carriere=$client->client_mode_facturation_transport_carriere??$parametre->parametre_mode_facturation_carriere; $client_facturation_transport_carriere=$client->client_facturation_transport_carriere??$parametre->parametre_facturation_transport_carriere; $client_facturation_transport_incomplet_carriere=$client->client_facturation_transport_incomplet_carriere??$parametre->parametre_transport_incomplet_carriere; $client_transport_detaille_carriere=$client->client_transport_detaille_carriere??$parametre->parametre_transport_detaille_carriere; $client_tgap_carriere=$client->client_tgap_carriere??$parametre->parametre_tgap_carriere; $client_rep_granulat_1_facturable=$client->client_rep_granulat_1_facturable??$parametre->parametre_rep_granulat_1_facturable; $client_contrib_env_granulat_facturable=$client->client_contrib_env_granulat_facturable??$parametre->parametre_contrib_env_granulat_facturable; $client_model_facture=$client->client_model_facture??$parametre->parametre_model_facture; $client_presentation_facture=$client->client_presentation_facture??$parametre->parametre_presentation_facture; $client_sous_total_bl=$client->client_sous_total_bl??$parametre->parametre_sous_total_bl; $client_sous_total_chantier=$client->client_sous_total_chantier??$parametre->parametre_sous_total_chantier; $client_relance=$client->client_relance??$parametre->parametre_client_relance_auto; $cleint_bl_detaille=$client->cleint_bl_detaille??$parametre->parametre_bl_detaille; $cleint_releve_de_facture=$client->cleint_releve_de_facture??$parametre->parametre_releve_facture; $client_releve_de_bl=$client->client_releve_de_bl??$parametre->parametre_releve_bl; $client_client_non_facturable=$client->client_client_non_facturable??$parametre->parametre_client_non_facturable; $client_duplicata=$client->client_duplicata??$parametre->parametre_nb_duplicata; $sous_famille_client_id=$client->sous_famille_client_id??$parametre->sous_famille_client_id; $mode_reg_id=$client->mode_reg_id??$parametre->mode_reg_id; $echance_id=$client->echance_id??$parametre->echance_id; $client_frais_facturation_beton=$client->client_frais_facturation_beton??$parametre->parametre_frais_facturation_beton; $client_frais_facturation_carriere=$client->client_frais_facturation_carriere??$parametre->parametre_frais_facturation_granulat; @endphp {{-- Nouvelle présentation de la fiche client, ouverte par le bouton invisible en haut à droite de la fiche actuelle (form.blade.php). Mêmes onglets, mêmes boutons en bas, mêmes alertes en haut à droite, et surtout mêmes id / name de champs : le script (client.form_script) et l'enregistrement sont communs aux deux présentations. Seuls l'habillage (cartes blanches, libellés courts, onglets soulignés) et le regroupement des champs changent. Les tableaux inclus (chantiers, devis, BL…) ne sont pas restylés ici : ils gardent leurs propres colonnes. --}} {{-- dt-moderne : tous les tableaux des onglets prennent le style de la grille clients v2 (inc/css/style.css) --}}
@csrf @php $nouvelle_fiche = !$client->id_client; $centrales_ouvertes = $parametre->parametre_presence_centrale_visible == 1; @endphp

Client

@if($client->id_client){{$client->client_code}} · {{$client->client_nom}}@else Nouveau client @endif
@if($client->id_client) {{-- Volume produit sur 12 mois (client.volume_12_mois), rempli par le script en bas de vue --}}
Volume 12 mois
…
@endif
{{-- Centrales du client, à la place de presence_centrale : volet qui s'ouvre sous le bouton, puces comme l'État des camions. Mêmes cases centrales[] (classe ajout_centrale, id centrale_{id}) : l'enregistrement est inchangé. --}}
Identification
id_client) maxlength="{{$max_length_code_client}}"> @if($client->id_client) @endif
Coordonnées
@include('fiche_annexe.recherche_commune_fiche_annexe',['commune_id'=>isset($client->id_client)?$client->commune_id:0])
Classement
Crédit
Options
Conditions
client_delegation)>
client_ouverture_compte)>
Dématérialisation
Info production
id_client || $client->client_definir_en_prod)>
@if($client->id_client)
CA HT facturé (avoirs déduits)
-
Volume facturé
-
Encours / crédit autorisé
-
Factures échues non réglées
-
@php($synthese_avec_marge = $profil->profil_visualiser_cout_facture == 1) @if($synthese_avec_marge)
Marge HT (CA - coût)
-
@endif
Devis (12 derniers mois)
-
Dernière livraison
-
Actions commerciales
Dernière : -
Prochaine : -
CA HT mensuel
Répartition du CA HT
Aucune facture sur la période
Top 5 chantiers par CA HT
Aucun chantier facturé sur la période
Top 5 chantiers par volume
Aucun chantier facturé sur la période
Prix moyen HT
Volume mensuel sur 3 ans
{{-- Détail d'une carte KPI : déplacée dans le body au chargement par form_script (le transform de #affiche_client) --}}
@endif
Transport et contributions
Présentation des factures
client_chantier_pour_facturartion)>
client_corus)>
client_bon_commande_a_envoyer)>
Règlement
client_copie_auto_ds_chantier || !$client->id_client)>
Identifiants et facture électronique
Banque
Assurance crédit
@include('fiche_annexe.table_assurance_credit_dans_client', ['client_id' => $client->id_client])
@if(request('modifier_client')==false && request()->has('id_chantier') && !empty(request('id_chantier'))) @include('chantier.index', ['id_chantier' => request('id_chantier'), 'statuts_en_puces' => true]) @else @include('chantier.index', ['statuts_en_puces' => true]) @endif
Commerciaux
@include('fiche_annexe.table_contact_fiche_annexe',['type_fiche_annexe'=>'client','id_fiche_annexe'=>$client->id_client])
@include('fiche_annexe.table_action_fiche_annexe',['type_fiche_annexe'=>'client','id_fiche_annexe'=>$client->id_client])
@if($client->id_client)
Action Devis Première livraison chantier Incident
@endif
@include('fiche_annexe.table_devis_fiche_annexe',['type_fiche_annexe'=>'client','id_fiche_annexe'=>$client->id_client])
@include('fiche_annexe.table_bl_fiche_annexe',['type_fiche_annexe'=>'client','id_fiche_annexe'=>$client->id_client])
@include('fiche_annexe.table_facture_fiche_annexe',['type_fiche_annexe'=>'client','id_fiche_annexe'=>$client->id_client])
@include('fiche_annexe.table_reglement_fiche_annexe',['type_fiche_annexe'=>'client','id_fiche_annexe'=>$client->id_client])
@include('adresse_facturation.index',['type_fiche_annexe'=>'client','id_fiche_annexe'=>$client->id_client])
@if($parametre->parametre_client_code_comptable_multiple)
@include('client.table_code_comptable_multiple')
@endif
@include('client.form_script')