templates/backend/entreprise/show.html.twig line 1

Open in your IDE?
  1. {% extends 'backend/base.html.twig' %}
  2. {% block title %}Entreprise {{ entreprise.raisonSocial }}{% endblock %}
  3. {% block content %}
  4.     {% embed 'backend/partials/_breadcrumb.html.twig' with {
  5.         datas: [
  6.             {label: 'Entreprises', url: path('advanced_search', {entity: 'entreprise'})},
  7.             {label: entreprise.raisonSocial ~ ' <i>(#' ~ entreprise.id ~ ')</i>'}
  8.         ],
  9.         buttons: [
  10.             {
  11.                 display: is_granted('ROLE_UPDATE_ENTITY') ? true : false,
  12.                 url: path('edit_entreprise', {'id': entreprise.id }),
  13.                 class: 'btn btn-sm btn-primary',
  14.                 icon: 'fas fa-edit',
  15.                 label: 'Modifier'
  16.             }
  17.         ]
  18.     } %}
  19.         {% block other_button_after %}
  20.             {% if is_granted('ROLE_ADMIN') %}
  21.                 <a href="{{ path('show_entreprise_cotisation', {id: entreprise.id}) }}" class="btn btn-sm btn-primary">
  22.                     <i class="fas fa-eye"></i> Voir les cotisations
  23.                 </a>
  24.                 <a href="{{ path('show_history_entreprise', {id: entreprise.id}) }}" class="btn btn-sm btn-primary">
  25.                     <i class="fas fa-archive"></i> Historique des modifications
  26.                 </a>
  27.                 <a href="{{ path('duplicate_entreprise', {id: entreprise.id}) }}" class="btn btn-sm btn-warning">
  28.                     <i class="fa-regular fa-copy"></i> Dupliquer
  29.                 </a>
  30.                 {% if entreprise.status != constant('App\\Entity\\Entreprise::STATUS_MERGED') %}
  31.                     <a href="#" class="btn btn-sm btn-warning" data-bs-toggle="modal" data-bs-target="#fusionModal">
  32.                         <i class="fa-solid fa-code-merge"></i> Fusionner
  33.                     </a>
  34.                 {% endif %}
  35.                 <div class="modal fade" id="fusionModal" tabindex="-1" aria-labelledby="fusionModalLabel" aria-hidden="true">
  36.                     <div class="modal-dialog">
  37.                         <div class="modal-content">
  38.                             {{ form_start(formFusion) }}
  39.                                 <div class="modal-header">
  40.                                     <h1 class="modal-title fs-5" id="fusionModalLabel">Fusionner</h1>
  41.                                     <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
  42.                                 </div>
  43.                                 <div class="modal-body text-start">
  44.                                         {{ form_row(formFusion.toFirm) }}
  45.                                         {{ form_row(formFusion.date) }}
  46.                                         {{ form_row(formFusion.type) }}
  47.                                         {{ form_row(formFusion.comment) }}
  48.                                 </div>
  49.                                 <div class="modal-footer">
  50.                                     <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Annuler</button>
  51.                                     <button type="submit" class="btn btn-primary">Valider</button>
  52.                                 </div>
  53.                             {{ form_end(formFusion) }}
  54.                         </div>
  55.                     </div>
  56.                 </div>
  57.             {% endif %}
  58.         {% endblock %}
  59.     {% endembed %}
  60.     <div class="row justify-content-md-center mb-4">
  61.         <div class="col-12 col-lg-6">
  62.             <div class="card h-100">
  63.                 <div class="card-header card-header-dark">
  64.                     Informations générales
  65.                     <span class="mx-2 float-end badge bg-{{ entreprise.isMember ? 'success' : 'danger' }} p-2">
  66.                         {{ (entreprise.isMember ? 'adhésion payée' : 'adhésion non payée')|upper }}
  67.                     </span>
  68.                     <span class="float-end badge bg-{{ entreprise.firmType.color ?? 'secondary' }} p-2">
  69.                         {{ entreprise.firmType.name|upper }}
  70.                     </span>
  71.                     {{ bagdeStatusFirm(entreprise.status, 'float-end mx-2') }}
  72.                 </div>
  73.                 <div class="card-body">
  74.                     <div class="row mb-3">
  75.                         <div class="col-3 text-bold">Raison sociale</div>
  76.                         <div class="col-9">{{ entreprise.raisonSocial }}</div>
  77.                     </div>
  78.                     <div class="row mb-3">
  79.                         <div class="col-3 text-bold">Téléphone bureau</div>
  80.                         <div class="col-9">{{ entreprise.tel1 }}</div>
  81.                     </div>
  82.                     <div class="row mb-3">
  83.                         <div class="col-3 text-bold">Email</div>
  84.                         <div class="col-9">{{ entreprise.email }}</div>
  85.                     </div>
  86.                     <div class="row mb-3">
  87.                         <div class="col-3 text-bold">N° APE</div>
  88.                         <div class="col-9">{{ entreprise.codeApe }}</div>
  89.                     </div>
  90.                     <div class="row mb-3">
  91.                         <div class="col-3 text-bold">N° Siret</div>
  92.                         <div class="col-9">{{ entreprise.codeSiren }}</div>
  93.                     </div>
  94.                     <div class="row mb-3">
  95.                         <div class="col-3 text-bold">N° TVA Intracom</div>
  96.                         <div class="col-9">{{ entreprise.numTvaIntracom }}</div>
  97.                     </div>
  98.                     <div class="row mb-3">
  99.                         <div class="col-3 text-bold">RC</div>
  100.                         <div class="col-9">{{ entreprise.numEdeCentre }}</div>
  101.                     </div>
  102.                     {% if entreprise.dateCessation %}
  103.                         <div class="row mb-3">
  104.                             <div class="col-3 text-bold">Date cessation activité</div>
  105.                             <div class="col-9">{{ entreprise.dateCessation ? entreprise.dateCessation|date('d/m/Y') : '' }}</div>
  106.                         </div>
  107.                     {% endif %}
  108.                     <div class="row mb-3 d-none">
  109.                         <div class="col-3 text-bold">Identifiant comptable</div>
  110.                         <div class="col-9">{{ entreprise.identifiantCompta }}</div>
  111.                     </div>
  112.                 </div>
  113.             </div>
  114.         </div>
  115.         <div class="col-12 col-lg-6 mt-4 mt-lg-0">
  116.             <div class="h-100">
  117.                 <div class="card">
  118.                     <div class="card-header card-header-dark">
  119.                         <div class="pb-2">Adresse du siège social</div>
  120.                     </div>
  121.                     <div class="card-body">
  122.                         <div class="mb-2">
  123.                             <span class="text-bold show-label">Adresse:</span>
  124.                             <span>{{ entreprise.adresse is not empty ? entreprise.adresse : '' }}</span>
  125.                         </div>
  126.                         <div class="mb-2">
  127.                             <span class="text-bold show-label">Adresse compl.:</span>
  128.                             <span>{{ entreprise.adresse2 is not empty ? entreprise.adresse2 : '' }}</span>
  129.                         </div>
  130.                         <div class="mb-2">
  131.                             <span class="text-bold show-label">Code postal:</span>
  132.                             <span>{{ entreprise.codePostal is not empty ? entreprise.codePostal : '' }}</span>
  133.                         </div>
  134.                         <div class="mb-2">
  135.                             <span class="text-bold show-label">Ville:</span>
  136.                             <span>{{ entreprise.ville is not empty ? entreprise.ville : '' }}</span>
  137.                         </div>
  138.                         <div class="mb-2">
  139.                             <span class="text-bold show-label">Département:</span>
  140.                             <span>{{ entreprise.departement is not null ? entreprise.departement.nom : '' }}</span>
  141.                         </div>
  142.                         <div class="mb-2">
  143.                             <span class="text-bold show-label">Région:</span>
  144.                             <span>{{ entreprise.departement is not null and entreprise.departement.regions is not null ? entreprise.departement.regions.first.nom : '' }}</span>
  145.                         </div>
  146.                     </div>
  147.                 </div>
  148.                 <div class="card mb-0">
  149.                     <div class="card-header card-header-dark">
  150.                         Fédération
  151.                     </div>
  152.                     <div class="card-body">
  153.                         <div class="row mb-3">
  154.                             <div class="col-3 text-bold">Syndicat de rattachement</div>
  155.                             <div class="col-9">{{ entreprise.syndicat.nom is defined ? entreprise.syndicat.nom : '' }}</div>
  156.                         </div>
  157.                         <div class="row mb-3">
  158.                             <div class="col-3 text-bold">Région de rattachement</div>
  159.                             <div class="col-9">{{ entreprise.homeRegion ? entreprise.homeRegion.nom : '' }}</div>
  160.                         </div>
  161.                         <div class="row mb-3">
  162.                             <div class="col-3 text-bold">Groupe entreprise</div>
  163.                             <div class="col-9">{{ entreprise.groupeEntreprise ? entreprise.groupeEntreprise.nom : '' }}</div>
  164.                         </div>
  165.                         <div class="row mb-3">
  166.                             <div class="col-3 text-bold">Commission</div>
  167.                             <div class="col-9">{{ entreprise.commission ? entreprise.commission.nom : '' }}</div>
  168.                         </div>
  169.                     </div>
  170.                 </div>
  171.             </div>
  172.         </div>
  173.     </div>
  174.     {% if entreprise.firmType.tag in ['trader', 'transporter'] %}
  175.         <div class="card mb-4">
  176.             <div class="card-header card-header-dark">
  177.                 Etablissement(s) / Centres de rassemblement
  178.                 {% if is_granted('ROLE_ADMIN') %}
  179.                     <a href="{{ path('add_establishment', {id: entreprise.id}) }}" class="float-end text-white">
  180.                         <i class="fas fa-plus fa-2x"></i>
  181.                     </a>
  182.                 {% endif %}
  183.             </div>
  184.             <div class="card-body">
  185.                 <div class="table-responsive">
  186.                     <table class="table">
  187.                         <thead>
  188.                             <tr>
  189.                                 <th>Type</th>
  190.                                 <th>Tél</th>
  191.                                 <th>Email</th>
  192.                                 <th>N° siret</th>
  193.                                 <th>Code EDE</th>
  194.                                 <th>Adresse</th>
  195.                                 <th>Département</th>
  196.                                 <th>Date de cessation</th>
  197.                                 <th class="text-center">Actions</th>
  198.                             </tr>
  199.                         </thead>
  200.                         <tbody>
  201.                             {% for key, etablissement in entreprise.etablissements %}
  202.                                 <tr>
  203.                                     <td>{{ etablissement.siegeSocial ? '<strong class="text-primary">Siège social</strong>'|raw : 'Etablissement' }}</td>
  204.                                     <td>{{ etablissement.telBureau1 }}</td>
  205.                                     <td>{{ etablissement.emailBureau }}</td>
  206.                                     <td>{{ etablissement.codeSiret }}</td>
  207.                                     <td>{{ etablissement.codeEde }}</td>
  208.                                     <td>
  209.                                         {{ etablissement.adresse }}<br>
  210.                                         {{ etablissement.codePostal }}<br>
  211.                                         {{ etablissement.ville }}
  212.                                     </td>
  213.                                     <td>{{ etablissement.departement ? etablissement.departement.nom : '' }}</td>
  214.                                     <td>{{ etablissement.dateCessation ? etablissement.dateCessation|date('d/m/Y') }}</td>
  215.                                     <td class="text-center">
  216.                                         <button class="btn btn-outline-secondary btn-icon btn-rounded dropdown-toggle custom-dropdown" type="button" id="dropdownMenu_{{ key }}" data-bs-toggle="dropdown" aria-expanded="false">
  217.                                             <i class="fa-solid fa-ellipsis"></i>
  218.                                         </button>
  219.                                         <ul class="dropdown-menu" aria-labelledby="dropdownMenu_{{ key }}">
  220.                                             <li>
  221.                                                 <a class="dropdown-item" href="{{ path('show_establishment', {id: etablissement.id }) }}">
  222.                                                     <i class="fas fa-eye"></i> Visualiser
  223.                                                 </a>
  224.                                             </li>
  225.                                             {% if is_granted('ROLE_ADMIN') %}
  226.                                             <li>
  227.                                                 <a class="dropdown-item" href="{{ path('edit_establishment', {id: etablissement.id}) }}">
  228.                                                     <i class="fas fa-edit"></i> Editer
  229.                                                 </a>
  230.                                             </li>
  231.                                             <li>
  232.                                                 <a
  233.                                                         class="dropdown-item"
  234.                                                         href="{{ path('delete_establishment', {id: etablissement.id}) }}"
  235.                                                         data-controller="confirm-delete"
  236.                                                         data-confirm-delete-url-value="{{ path('delete_establishment', {id: etablissement.id}) }}"
  237.                                                         data-confirm-delete-message-value="Etes-vous sûr de vouloir supprimer cet établissement ?"
  238.                                                         data-confirm-delete-token-value="{{ csrf_token('etablissement_' ~ etablissement.id) }}"
  239.                                                         data-confirm-delete-action-value="delete_line"
  240.                                                 >
  241.                                                     <i class="fas fa-trash"></i> Supprimer
  242.                                                 </a>
  243.                                             </li>
  244.                                             {% endif %}
  245.                                         </ul>
  246.                                     </td>
  247.                                 </tr>
  248.                             {% endfor %}
  249.                         </tbody>
  250.                     </table>
  251.                 </div>
  252.             </div>
  253.         </div>
  254.     {% endif %}
  255.     {% if
  256.         entreprise.firmType.tag in ['trader', 'transporter'] and
  257.         is_granted('ROLE_BOARD_DIRECTOR') == false and
  258.         is_granted('ROLE_REGIONAL_AGENT') == false and
  259.         is_granted('ROLE_UNION_PRESIDENT') == false
  260.     %}
  261.         <div class="card mb-4">
  262.         <div class="card-header card-header-dark">
  263.             Secteur d'activité
  264.         </div>
  265.         <div class="card-body">
  266.             {% set totalSpecies = 0 %}
  267.             <div class="row mb-3">
  268.                 <div class="col-3 col-lg-1 text-bold">Espèce(s)</div>
  269.                 <div class="col-9 col-lg-11">
  270.                     {% if entreprise.entrepriseActivities|length == 0 %}
  271.                         Aucune espèce
  272.                     {% else %}
  273.                         {% for firmActivity in entreprise.entrepriseActivities %}
  274.                             {% if firmActivity.checked and firmActivity.activity.isEnabled %}
  275.                                 {# <span class="badge bg-primary p-2">{{firmActivity.activity.nom|capitalize ~ (entreprise.isTransporter == false ? ' - ' ~ firmActivity.number)}}</span> #}
  276.                                 <span class="badge bg-primary p-2">{{firmActivity.activity.nom|capitalize ~ (entreprise.firmType.tag == 'trader' ? ' - ' ~ firmActivity.number)}}</span>
  277.                                 {% set totalSpecies = totalSpecies + firmActivity.number %}
  278.                             {% endif %}
  279.                         {% endfor %}
  280.                     {% endif %}
  281.                 </div>
  282.             </div>
  283.             <div class="row mb-3">
  284.                 <div class="col-3 col-lg-1 text-bold">Volume total</div>
  285.                 <div class="col-9 col-lg-11">{{ entreprise.totalCountSpecies }}</div>
  286.             </div>
  287.             {% if entreprise.firmType.tag == 'transporter' %}
  288.                 <hr>
  289.                 <div class="row">
  290.                     <div class="col-12 col-lg-3 d-none">
  291.                         <div class="row mb-3">
  292.                             <div class="col-5 text-bold">Autre activité</div>
  293.                             <div class="col-7">
  294.                                 {{ entreprise.autreActivite ?? '<i><small>Aucune</small></i>'  }}
  295.                             </div>
  296.                         </div>
  297.                     </div>
  298.                     <div class="col-12 col-lg-3">
  299.                         <div class="row mb-3">
  300.                             <div class="col-5 text-bold">N° agrément transport</div>
  301.                             <div class="col-7">
  302.                                 {{ entreprise.transporteur ? entreprise.transporteur.numAgrementTransport  }}
  303.                             </div>
  304.                         </div>
  305.                     </div>
  306.                     <div class="col-12 col-lg-3">
  307.                         <div class="row mb-3">
  308.                             <div class="col-5 text-bold">Nb de Licence Transport interne</div>
  309.                             <div class="col-7">
  310.                                 {{ entreprise.transporteur ? entreprise.transporteur.nombreLicenseInterne  }}
  311.                             </div>
  312.                         </div>
  313.                     </div>
  314.                     <div class="col-12 col-lg-3">
  315.                         <div class="row mb-3">
  316.                             <div class="col-5 text-bold">Nb de Licence intracommunautaire</div>
  317.                             <div class="col-7">
  318.                                 {{ entreprise.transporteur ? entreprise.transporteur.nombreLicenceIntracom }}
  319.                             </div>
  320.                         </div>
  321.                     </div>
  322.                 </div>
  323.             {% else %}
  324.                 {% if totalSpecies != entreprise.totalCountSpecies %}
  325.                     <div class="alert alert-warning">
  326.                         Le volume total est différent de la somme des volumes par espèce
  327.                     </div>
  328.                 {% endif %}
  329.                 <hr>
  330.                 <div class="row">
  331.                     <div class="col-12 col-lg-3">
  332.                         <div class="row mb-3">
  333.                             <div class="col-5 text-bold">Autre activité</div>
  334.                             <div class="col-7">
  335.                                 {{ entreprise.autreActivite ?? '<i><small>Aucune</small></i>'  }}
  336.                             </div>
  337.                         </div>
  338.                     </div>
  339.                     <div class="col-12 col-lg-3 d-none">
  340.                         <div class="row mb-3">
  341.                             <div class="col-5 text-bold">Volume d'animaux</div>
  342.                             <div class="col-7">
  343.                                 {{ entreprise.volumeAnimaux  }}
  344.                             </div>
  345.                         </div>
  346.                     </div>
  347.                     <div class="col-12 col-lg-3 d-none">
  348.                         <div class="row mb-3">
  349.                             <div class="col-5 text-bold">Autre spécialité</div>
  350.                             <div class="col-7">
  351.                                 {{ entreprise.autreSpecialite  }}
  352.                             </div>
  353.                         </div>
  354.                     </div>
  355.                     <div class="col-12 col-lg-3">
  356.                         <div class="row mb-3">
  357.                             <div class="col-5 text-bold">Transport pour autrui</div>
  358.                             <div class="col-7">
  359.                                 {{ entreprise.transportPourAutrui ? "oui"|upper : "non"  }}
  360.                             </div>
  361.                         </div>
  362.                     </div>
  363.                 </div>
  364.                 {#
  365.                 <hr>
  366.                 <div class="row">
  367.                     <div class="col-12 col-lg-3">
  368.                         <div class="row mb-3">
  369.                             <div class="col-5 text-bold">EDE Négoce</div>
  370.                             <div class="col-7">
  371.                                 {{ entreprise.numEdeNegoce  }}
  372.                             </div>
  373.                         </div>
  374.                     </div>
  375.                     <div class="col-12 col-lg-3">
  376.                         <div class="row mb-3">
  377.                             <div class="col-5 text-bold">EDE Centre Rassemblement</div>
  378.                             <div class="col-7">
  379.                                 {{ entreprise.numEdeCentre }}
  380.                             </div>
  381.                         </div>
  382.                     </div>
  383.                     <div class="col-12 col-lg-3">
  384.                         <div class="row mb-3">
  385.                             <div class="col-5 text-bold">EDE Elevage</div>
  386.                             <div class="col-7">
  387.                                 {{ entreprise.numEdeElevage }}
  388.                             </div>
  389.                         </div>
  390.                     </div>
  391.                 </div>
  392.                 #}
  393.             {% endif %}
  394.             <hr>
  395.             <div class="row mb-3">
  396.                 <div class="col-3 col-lg-1 text-bold">Nb employés</div>
  397.                 <div class="col-9 col-lg-11">
  398.                     {{ entreprise.nombreEmployes  }}
  399.                 </div>
  400.             </div>
  401.         </div>
  402.     </div>
  403.     {% endif %}
  404.     <div class="card mb-4">
  405.         <div class="card-header card-header-dark">
  406.             Contacts
  407.             {% if is_granted('ROLE_ADMIN') %}
  408.                 <a href="{{ path('add_contact_from_firm', {id: entreprise.id}) }}" class="float-end text-white">
  409.                     <i class="fas fa-plus fa-2x"></i>
  410.                 </a>
  411.             {% endif %}
  412.         </div>
  413.         <div class="card-body">
  414.             <div class="table-responsive">
  415.                 <table class="table">
  416.                     <thead>
  417.                         <tr>
  418.                             <th>Type</th>
  419.                             <th>Nom</th>
  420.                             <th>Prénom</th>
  421.                             <th>Email</th>
  422.                             <th>Tél. portable</th>
  423.                             <th>Commission</th>
  424.                             <th>Conseil admin.</th>
  425.                             <th>Repères</th>
  426.                             <th>Privil.</th>
  427.                             <th>Utilisateur extranet ?</th>
  428.                             <th class="text-center">Action(s)</th>
  429.                         </tr>
  430.                     </thead>
  431.                     <tbody>
  432.                         {% for key, contact in entreprise.contacts %}
  433.                             {% if contact.status != constant('App\\Entity\\Contact::STATUS_ARCHIVED') %}
  434.                                 <tr>
  435.                                     <td class="text-bold">{{ (contact.isResponsible ? '<span class="text-success">Responsable</span>' : 'Employé')|raw }}</td>
  436.                                     <td>{{ contact.nom }}</td>
  437.                                     <td>{{ contact.prenom }}</td>
  438.                                     <td>{{ contact.emailContact }}</td>
  439.                                     <td>{{ contact.telPortable }}</td><td>
  440.                                         <ul class="">
  441.                                             {% for commission in contact.commissionsContacts %}
  442.                                                 <li>{{ commission.commission.nom }}</li>
  443.                                             {% endfor %}
  444.                                         </ul>
  445.                                     </td>
  446.                                     <td>
  447.                                         <ul class="">
  448.                                             {% for contactConseilAdministration in contact.contactConseilAdministrations %}
  449.                                                 <li>{{ contactConseilAdministration.conseilAdministration.role }}</li>
  450.                                             {% endfor %}
  451.                                         </ul>
  452.                                     </td>
  453.                                     <td>
  454.                                         <ul class="">
  455.                                             {% for repere in contact.repere %}
  456.                                                 <li>{{ repere.nom }}</li>
  457.                                             {% endfor %}
  458.                                         </ul>
  459.                                     </td>
  460.                                     <td class="text-bold">{{ contact.isPrivileged ? 'Oui' : 'Non' }}</td>
  461.                                     <td class="text-bold">{{ contact.user is not null ? 'Oui (#' ~ contact.user.id ~ ')' : 'Non' }}</td>
  462.                                     <td class="text-center">
  463.                                         <button class="btn btn-outline-secondary btn-icon btn-rounded dropdown-toggle custom-dropdown" type="button" id="dropdownMenu_{{ key }}" data-bs-toggle="dropdown" aria-expanded="false">
  464.                                             <i class="fa-solid fa-ellipsis"></i>
  465.                                         </button>
  466.                                         <ul class="dropdown-menu" aria-labelledby="dropdownMenu_{{ key }}">
  467.                                             <li>
  468.                                                 <a class="dropdown-item" href="{{ path('show_contact', {id: contact.id }) }}">
  469.                                                     <i class="fas fa-eye"></i> Visualiser
  470.                                                 </a>
  471.                                             </li>
  472.                                             {% if is_granted('ROLE_ADMIN') %}
  473.                                                 <li>
  474.                                                     <a class="dropdown-item" href="{{ path('edit_contact_from_firm', {id: contact.id}) }}">
  475.                                                         <i class="fas fa-edit"></i> Editer
  476.                                                     </a>
  477.                                                 </li>
  478.                                                 <li>
  479.                                                     <a
  480.                                                             class="dropdown-item"
  481.                                                             href="#"
  482.                                                             data-controller="confirm-delete"
  483.                                                             data-confirm-delete-url-value="{{ path('archive_contact', {id: contact.id}) }}"
  484.                                                             data-confirm-delete-message-value="Etes-vous sûr de vouloir archiver ce contact ?"
  485.                                                             data-confirm-delete-token-value="{{ csrf_token('contact_' ~ contact.id) }}"
  486.                                                             data-confirm-delete-action-value="delete_line"
  487.                                                     >
  488.                                                         <i class="fas fa-archive"></i> Archiver
  489.                                                     </a>
  490.                                                 </li>
  491.                                             {% endif %}
  492.                                         </ul>
  493.                                     </td>
  494.                                 </tr>
  495.                             {% endif %}
  496.                         {% endfor %}
  497.                     </tbody>
  498.                 </table>
  499.             </div>
  500.         </div>
  501.     </div>
  502.     {% if
  503.         entreprise.firmType.tag in ['trader', 'transporter'] and
  504.         is_granted('ROLE_BOARD_DIRECTOR') == false and
  505.         is_granted('ROLE_REGIONAL_AGENT') == false and
  506.         is_granted('ROLE_UNION_PRESIDENT') == false
  507.     %}
  508.         <div class="card mb-4 d-none">
  509.             <div class="card-header card-header-dark">
  510.                 Adhésion
  511.             </div>
  512.             <div class="card-body">
  513.                 <div class="row">
  514.                     <div class="col-12 col-lg-6">
  515.                         <div class="row mb-3">
  516.                             <div class="col-3 text-bold">Souhaite adhérer ?</div>
  517.                             <div class="col-9">
  518.                                 {{ entreprise.souhaiteAdherer ? '<span class="text-bold text-success">Oui</span>' : 'Non'  }}
  519.                             </div>
  520.                         </div>
  521.                     </div>
  522.                     <div class="col-12 col-lg-6">
  523.                         <div class="row mb-3">
  524.                             <div class="col-3 text-bold">Figurer dans l'annuaire ?</div>
  525.                             <div class="col-9">
  526.                                 {{ entreprise.figurerAnnuaireAdherents ? '<span class="text-bold text-success">Oui</span>' : 'Non'  }}
  527.                             </div>
  528.                         </div>
  529.                     </div>
  530.                 </div>
  531.                 {% if entreprise.raisonNonAdhesion is not null and entreprise.raisonNonAdhesion|trim != '' %}
  532.                 <div class="row mt-3">
  533.                     <div class="col-12 col-lg-6">
  534.                         <div class="row mb-3">
  535.                             <div class="col-3 text-bold">Raison de non adhésion</div>
  536.                             <div class="col-9">
  537.                                 {{ entreprise.raisonNonAdhesion  }}
  538.                             </div>
  539.                         </div>
  540.                     </div>
  541.                     <div class="col-12 col-lg-6">
  542.                         <div class="row mb-3">
  543.                             <div class="col-3 text-bold"></div>
  544.                             <div class="col-9">
  545.                                 {{ entreprise.raisonNonAdhesionAutre  }}
  546.                             </div>
  547.                         </div>
  548.                     </div>
  549.                 </div>
  550.                 {% endif %}
  551.             </div>
  552.         </div>
  553.     {% endif %}
  554.     {% if entreprise.firmType.tag in ['trader', 'transporter'] %}
  555.         <div class="card mb-4">
  556.             <div class="card-header card-header-dark">
  557.                 QUALI NEGOCE
  558.             </div>
  559.             <div class="card-body">
  560.                 <div class="row mb-3">
  561.                     <div class="col-3 text-bold">Quali Négoce ?</div>
  562.                     <div class="col-9">
  563.                         {{ entreprise.isQualiNegoce ? '<span class="text-bold text-success">Oui</span>' : 'Non'  }}
  564.                     </div>
  565.                 </div>
  566.                 <div class="row">
  567.                     <div class="col-12 col-lg-4 mb-3">
  568.                         <div class="row">
  569.                             <div class="col-3 text-bold">Date de certification</div>
  570.                             <div class="col-9">
  571.                                 {{ entreprise.qualiNegoceCertificationDate ? entreprise.qualiNegoceCertificationDate|date('d/m/Y')  }}
  572.                             </div>
  573.                         </div>
  574.                     </div>
  575.                     <div class="col-12 col-lg-4 mb-3">
  576.                         <div class="row">
  577.                             <div class="col-3 text-bold">Date pre audit</div>
  578.                             <div class="col-9">
  579.                                 {{ entreprise.qualiNegocePreAuditDate ? entreprise.qualiNegocePreAuditDate|date('d/m/Y')  }}
  580.                             </div>
  581.                         </div>
  582.                     </div>
  583.                     <div class="col-12 col-lg-4 mb-3">
  584.                         <div class="row">
  585.                             <div class="col-3 text-bold">Date d’audit intermédiaire</div>
  586.                             <div class="col-9">
  587.                                 {{ entreprise.qualiNegoceCertificationDate ? entreprise.qualiNegoceCertificationDate|date_modify("+18 month")|date('d/m/Y')  }}
  588.                             </div>
  589.                         </div>
  590.                     </div>
  591.                 </div>
  592.                 <hr class="mb-4">
  593.                 <h4 class="mt-4 mb-3">Nom du / des référent(s)</h4>
  594.                 <div class="table-responsive">
  595.                     <table class="w-100" id="quali-negoce-contacts">
  596.                         <tbody>
  597.                         {% for firmContactQualiNegoce in entreprise.firmContactQualiNegoces %}
  598.                             <tr>
  599.                                 <td>
  600.                                     {{ firmContactQualiNegoce.contact.fullname }}
  601.                                 </td>
  602.                             </tr>
  603.                         {% endfor %}
  604.                         </tbody>
  605.                     </table>
  606.                 </div>
  607.                 <hr class="mb-4">
  608.                 <h4 class="mt-4 mb-3">Mes documents Quali Negoce</h4>
  609.                 <div class="table-responsive">
  610.                     <table class="w-100" id="quali-negoce-document">
  611.                         <tbody>
  612.                             {% for document in entreprise.firmQualiNegoceDocuments %}
  613.                                 <tr>
  614.                                     <td>
  615.                                         <a href="{{ vich_uploader_asset(document, 'documentFile') }}" target="_blank">{{ document.originalFileName }}</a>
  616.                                     </td>
  617.                                 </tr>
  618.                             {% endfor %}
  619.                         </tbody>
  620.                     </table>
  621.                 </div>
  622.             </div>
  623.         </div>
  624.     {% endif %}
  625.     {% if
  626.         entreprise.firmType.tag in ['trader', 'transporter'] and
  627.         is_granted('ROLE_BOARD_DIRECTOR') == false and
  628.         is_granted('ROLE_REGIONAL_AGENT') == false and
  629.         is_granted('ROLE_UNION_PRESIDENT') == false
  630.     %}
  631.         <div class="card mb-4">
  632.             <div class="card-header card-header-dark">
  633.                 Chiffre d'affaires des 3 dernières années
  634.             </div>
  635.             <div class="card-body">
  636.                 {% set year = 'now'|date('Y')|cast_to_int %}
  637.                 <div class="table-responsive">
  638.                     <table class="table">
  639.                         <thead>
  640.                             <tr>
  641.                                 <th>Année</th>
  642.                                 <th>Chiffre d'affaire</th>
  643.                                 <th>Type cotisation</th>
  644.                                 <th>Montant cotisation</th>
  645.                                 <th>Option(s)</th>
  646.                             </tr>
  647.                         </thead>
  648.                         <tbody>
  649.                             {% for i in [0, 1, 2] %}
  650.                                 {% set cotisation = entreprise.getCotisationByYear(year - i) %}
  651.                                 <tr>
  652.                                     <td>{{ year - i }}</td>
  653.                                     <td>{{ cotisation and cotisation.revenue > 0 ? cotisation.revenue|number_format(2, ',', ' ') ~ ' €' : 'Pas de chiffre d\'affaire renseigné pour l\'année ' ~ (year - i) }}</td>
  654.                                     <td>{{ cotisation and cotisation.cotisationType ? cotisation.cotisationType.name }}</td>
  655.                                     <td>{{ cotisation ? cotisation.priceTtc|number_format(2, ',', ' ') ~ ' €' }}</td>
  656.                                     <td>
  657.                                         {% if cotisation %}
  658.                                             <div>Import / Export: {{ cotisation.optionImportExport > 0 ? 'Oui' : 'Non' }}</div>
  659.                                             <div>Mapa: {{ cotisation.optionMapa ? 'Oui' : 'Non' }}</div>
  660.                                         {% endif %}
  661.                                     </td>
  662.                                 </tr>
  663.                             {% endfor %}
  664.                         </tbody>
  665.                     </table>
  666.                 </div>
  667.             </div>
  668.         </div>
  669.     {% endif %}
  670.     {% if
  671.         is_granted('ROLE_BOARD_DIRECTOR') == false and
  672.         is_granted('ROLE_REGIONAL_AGENT') == false and
  673.         is_granted('ROLE_UNION_PRESIDENT') == false
  674.     %}
  675.         <div class="card mb-4">
  676.             <div class="card-header card-header-dark">
  677.                 Commentaire
  678.             </div>
  679.             <div class="card-body">
  680.                 <div class="mb-2">
  681.                     <div class="text-bold show-label">Commentaire:</div>
  682.                     <div class="mt-3">{{ entreprise.commentaires|raw }}</div>
  683.                 </div>
  684.             </div>
  685.         </div>
  686.     {% endif %}
  687.     <div class="card mb-4">
  688.         <div class="card-header card-header-dark">
  689.             Liaison(s) entreprise
  690.         </div>
  691.         <div class="card-body">
  692.             <div class="table-responsive">
  693.                 <table class="table">
  694.                     <thead>
  695.                         <tr>
  696.                             <th>Entreprise source</th>
  697.                             <th>Type</th>
  698.                             <th>Entreprise cible</th>
  699.                             <th>Date</th>
  700.                             <th>Commentaire</th>
  701.                         </tr>
  702.                     </thead>
  703.                     <tbody>
  704.                         {% for fromMe in linkedFirmWithFromMe %}
  705.                             <tr>
  706.                                 <td>
  707.                                     <a href="{{ path('show_entreprise', {id: fromMe.fromFirm.id}) }}">
  708.                                         {{ fromMe.fromFirm.raisonSocial ~ ' (#' ~ fromMe.fromFirm.id ~ ')' }}
  709.                                     </a>
  710.                                 </td>
  711.                                 <td>{{ fromMe.type.name }}</td>
  712.                                 <td>
  713.                                     <a href="{{ path('show_entreprise', {id: fromMe.toFirm.id}) }}">
  714.                                         {{ fromMe.toFirm.raisonSocial ~ ' (#' ~ fromMe.toFirm.id ~ ')' }}
  715.                                     </a>
  716.                                 </td>
  717.                                 <td>{{ fromMe.date ? fromMe.date|date('d/m/Y') }}</td>
  718.                                 <td>{{ fromMe.comment }}</td>
  719.                             </tr>
  720.                         {% endfor %}
  721.                         {% for toMe in linkedFirmWithToMe %}
  722.                             <tr>
  723.                                 <td>
  724.                                     <a href="{{ path('show_entreprise', {id: toMe.fromFirm.id}) }}">
  725.                                         {{ toMe.fromFirm.raisonSocial ~ ' (#' ~ toMe.fromFirm.id ~ ')' }}
  726.                                     </a>
  727.                                 </td>
  728.                                 <td>{{ toMe.type.name }}</td>
  729.                                 <td>
  730.                                     <a href="{{ path('show_entreprise', {id: toMe.toFirm.id}) }}">
  731.                                         {{ toMe.toFirm.raisonSocial ~ ' (#' ~ toMe.toFirm.id ~ ')' }}
  732.                                     </a>
  733.                                 </td>
  734.                                 <td>{{ toMe.date ? toMe.date|date('d/m/Y') }}</td>
  735.                                 <td>{{ toMe.comment }}</td>
  736.                             </tr>
  737.                         {% endfor %}
  738.                     </tbody>
  739.                 </table>
  740.             </div>
  741.         </div>
  742.     </div>
  743. {% endblock %}