{% set table_class = 'table table-striped table-bordered' %}
{% if societes_a_reprendre is defined and societes_a_reprendre is not empty and secteur_info is defined and secteur_info %}
<div class="row bkg_blanc">
<div class="col-12 mt-3">
<table class="{{ table_class }}">
<tbody>
<th style="background-color: #4B7389; color: white; border-bottom: none;">
{% if secteur_info is defined and secteur_info and secteur_info.nom %}
Trouver des sociétés à reprendre dans le secteur "{{ secteur_info.nom }}"
{% else %}
Trouver des sociétés à reprendre dans ce secteur
{% endif %}
</th>
{% if societes_a_reprendre is not empty %}
{% for societe in societes_a_reprendre %}
<tr>
<td>
{% if societe.titre|default %}
<a href="/vente-entreprise-{{ societe.titre|slugify }},{{ societe.id_annonce_vendeur }}{{ codePaysWithUnderScore }}"
target="_blank" rel="noopener">{{ societe.titre }}</a>
{% endif %}
<br>
<div class="float-left">
<small>
CA : {{ societe.ca ? societe.ca|number_format(0, '.', ' ') ~ ' k€' : 'N.C.' }}
<span class="dotted-separator"></span>
{% if societe.id_annonce_vendeur %}
Réf. : V{{ societe.id_annonce_vendeur }}
<span class="dotted-separator"></span>
{% endif %}
{% if societe.date_parution is defined and societe.date_parution %}
{% set d = societe.date_parution %}
{% if d is iterable %}
<span class="text-nowrap">Posté le {{ d|date('d/m/Y') }}</span>
{% else %}
{% set ds = (d|length == 8) ? d|slice(6,2) ~ '/' ~ d|slice(4,2) ~ '/' ~ d|slice(0,4) : d %}
<span class="text-nowrap">Posté le {{ ds }}</span>
{% endif %}
<span class="dotted-separator"></span>
{% endif %}
{% if societe.pays %}
<span class="text-nowrap">{{ societe.pays }}</span>
{% endif %}
</small>
</div>
</td>
</tr>
{% endfor %}
{% endif %}
<tr>
<td class="text-center">
{% if secteur_info is defined and secteur_info %}
<a href="/cession-entreprise-{{ secteur_info.nom|slugify }},{{ secteur_info.id|default('') }}{{ codePaysWithUnderScore }}"
class="fullsouligne" target="_blank">
Les sociétés à reprendre du secteur "{{ secteur_info.nom|default('') }}"
{% if localisation_info is defined and localisation_info %}
/ en {{ localisation_info.nom_localisation|abv_nom_localisation|raw }}
{% endif %}
</a>
{% else %}
<a href="#" class="fullsouligne">Les sociétés à reprendre du secteur</a>
{% endif %}
</td>
</tr>
</tbody>
</table>
</div>
</div>
{% endif %}
{% if acquereurs_secteur is defined and acquereurs_secteur is not empty and secteur_info is defined and secteur_info %}
<div class="row bkg_blanc">
<div class="col-12">
<table class="{{ table_class }}">
<tbody>
<th style="background-color: #5f9779; color: white; border-bottom: none;">
{% if secteur_info is defined and secteur_info and secteur_info.nom %}
Ils veulent faire des acquisitions dans le secteur "{{ secteur_info.nom }}"
{% else %}
Ils veulent faire des acquisitions dans ce secteur
{% endif %}
</th>
{% if acquereurs_secteur is not empty %}
{% for acquereur in acquereurs_secteur %}
<tr>
<td>
<a href="/achat-entreprise-{{ acquereur.raison_sociale|slugify }},{{ (acquereur.id_annonce_acheteur is defined and acquereur.id_annonce_acheteur) ? acquereur.id_annonce_acheteur : acquereur.id_societe }}{{ codePaysWithUnderScore }}"
target="_blank" rel="noopener">{{ acquereur.raison_sociale }}</a><br>
<div class="float-left">
<small>
CA Max : {{ acquereur.ca ? acquereur.ca|number_format(0, '.', ' ') ~ ' k€' : 'N.C.' }}
<span class="dotted-separator"></span>
{% set refA = (acquereur.id_annonce_acheteur is defined and acquereur.id_annonce_acheteur) ? acquereur.id_annonce_acheteur : (acquereur.id_societe is defined ? acquereur.id_societe : null) %}
{% if refA %}
Réf. : A{{ refA }}
{% endif %}
{% if acquereur.date_parution is defined and acquereur.date_parution %}
<span class="dotted-separator"></span>
{% set d2 = acquereur.date_parution %}
{% if d2 is iterable %}
<span class="text-nowrap">Posté le {{ d2|date('d/m/Y') }}</span>
{% else %}
{% set ds2 = (d2|length == 8) ? d2|slice(6,2) ~ '/' ~ d2|slice(4,2) ~ '/' ~ d2|slice(0,4) : d2 %}
<span class="text-nowrap">Posté le {{ ds2 }}</span>
{% endif %}
{% endif %}
{% if acquereur.pays %}
<span class="dotted-separator"></span>
<span class="text-nowrap">{{ acquereur.pays }}</span>
{% endif %}
</small>
</div>
</td>
</tr>
{% endfor %}
{% endif %}
<tr>
<td class="text-center">
{% if secteur_info is defined and secteur_info %}
<a href="/reprise-entreprise-{{ secteur_info.nom|slugify }},{{ secteur_info.id|default('') }}{{ codePaysWithUnderScore }}"
class="fullsouligne" target="_blank">
Les acheteurs du secteur "{{ secteur_info.nom|default('') }}"
</a>
{% else %}
<a href="#" class="fullsouligne">Les acheteurs du secteur</a>
{% endif %}
</td>
</tr>
</tbody>
</table>
</div>
</div>
{% endif %}