{% extends 'layout.twig' %}

{% block body %}
	
	<div class="contenu clearfix"  id="fournisseurs">
    	<h1>{{ 'Fournisseurs' | trad }}</h1>
        {{ ariane() }}
         	
        <h2>{{ 'Fournisseur' | trad }}  : {{ libelle_fournisseur }} ({{ code_fournisseur }})</h2>
        
        {% include '@API/BVD/block_note_bvd.twig' %}
        
        {{ arianeSub() }}
         
     	<div id="BVD" class="tab-pane fade in active clearfix">
        	<div class="padding15">

                {% include '@API/BVD/block_information.twig' %}
                
                <style>
                	.pourc_value_red{
                    	font-size: 15px;
                    	position: absolute;
                    	top: 76px;
                    	right: 20px;
                    	color:red;
                	}
                	.pourc_value_green{
                    	font-size: 15px;
                    	position: absolute;
                    	top: 76px;
                    	right: 20px;
                    	color:green;
                	}
                	.pourc_value_red img, .pourc_value_green img{
                    	width: 16px;
                        margin-right: 5px;
                	}
                </style>
                
                <div class="clearfix">
                    <div class="tuilesIndicateur" style="width: 32%;">
                        <div class="titreTuile">{{ 'Chiffre d\'affaire net pour l\'année' | trad }} {{ valueFrs.record.YEAR_LAST_ACCOUNTS  }}</div>
                        <div class="resultTuile texteTuilebleu" style="font-size:20px">
                            <span>{{ valueFrs.record.OPRE |number_format(0, '.', ' ') }}k €</span>
                            {% if valueFrs.record.VAR1 < 0 %}<span class="pourc_value_red"><img src="{{ baseUrl('img/icon/arrow_down_16x16.png') }}" width="30px">{{ (valueFrs.record.VAR1*100) |round(1, 'floor') }}%</span>{% endif %}
                            {% if valueFrs.record.VAR1 >= 0 %}<span class="pourc_value_green"><img src="{{ baseUrl('img/icon/arrow_up_16x16.png') }}" width="30px">{{ (valueFrs.record.VAR1*100) |round(1, 'floor')  }}%</span>{% endif %}
                            <div style="margin-top: 75px;"><h5 class="details"><a href="{{ path('API.BVD.chiffreAffaire', {idFournisseur:code_fournisseur}) }}">{{ 'Voir détail' | trad }}</a></h5></div>
                        </div>
                    </div>
                    
                    <div class="tuilesIndicateur" style="width: 32%;">
                        <div class="titreTuile">{{ 'Actionnariat' | trad }}</div>
                        <div class="resultTuile texteTuilebleu" style="font-size:20px">
                            <span>{{ valueFrs.record.SH_COUNT }} {{ 'Actionnaire' | trad }}</span> <br>
                            <span>{{ valueFrs.record.SUB_COUNT }} {{ 'filiales' | trad }}</span> 
                            <div style="margin-top: 47px;"><h5 class="details"><a href="{{ path('API.BVD.actionnaire', {idFournisseur:code_fournisseur}) }}">{{ 'Voir détail' | trad }}</a></h5></div>
                        </div>
                    </div>
                    
                    <div class="tuilesIndicateur" style="width: 32%; margin-right:0px;">
                        <div class="titreTuile">{{ 'Revenu net pour' | trad }} {{ valueFrs.record.YEAR_LAST_ACCOUNTS }}</div>
                        <div class="resultTuile texteTuilebleu" style="font-size:20px">
                            <span>{{ valueFrs.record.PL |number_format(0, '.', ' ') }}k €</span> 
                            {% if valueFrs.record.VAR2 < 0 %}<span class="pourc_value_red"><img src="{{ baseUrl('img/icon/arrow_down_16x16.png') }}" width="30px">{{ (valueFrs.record.VAR2*100) |round(1, 'floor')  }}%</span>{% endif %}
                            {% if valueFrs.record.VAR2 >= 0 %}<span class="pourc_value_green"><img src="{{ baseUrl('img/icon/arrow_up_16x16.png') }}" width="30px">{{ (valueFrs.record.VAR2*100) |round(1, 'floor') }}%</span>{% endif %}
                        </div>
                    </div>
                </div>
                <hr>
                
                <style>

                </style>
                
                <div class="flexbox">
                    <div class="colonne4">
                    	<div class="block_spec">
                    		<div class="infos_spec">
                    			<p class="gras">Score MORE de risque crédit <span class="extra_space">par modelFinance</span></p>
                    		</div>
                            <div class="details_spec">
                                <span class="{{ class.MORE }}">{{ valueFrs.record.MORRAT }}</span>
                                <a class="bottom_text"href="{{ path('API.BVD.indicateurMORE',{idFournisseur:code_fournisseur}) }}">{{ 'Voir détail' | trad }}</a>
                            </div>
                    	</div>
                    </div>
                    
                    <div class="colonne4">
                    	<div class="block_spec">
                    		<div class="infos_spec">
                    			<p class="gras">Score de stabilité financière <span class="extra_space">par CRIF decision solution Ltd</span></p>
                    		</div>
                            <div class="details_spec">
                                <span class="{{ class.CRIT }}">{{ valueFrs.record.CRIF_SCORE }}</span>
                    		    <a class="bottom_text" href="{{ path('API.BVD.indicateurCRIF',{idFournisseur:code_fournisseur}) }}">{{ 'Voir détail' | trad }}</a>
                            </div>
                    	</div>
                    </div>
                    
                    <div class="colonne4">
                    	<div class="block_spec">
                    		<div class="infos_spec">
                    			<p class="gras">Score environnemental <span class="extra_space">par Trust</span></p>
                    		</div>
                            <div class="details_spec">
                                <span class="{{ class.TRUST }}">{{ valueFrs.record.TRUCOST_SCORE_ENVIRSCORE }}</span>
                    		    <a class="bottom_text" href="{{ path('API.BVD.indicateurTRUCOST',{idFournisseur:code_fournisseur}) }}">{{ 'Voir détail' | trad }}</a>
                            </div>
                    	</div>
                    </div>
                    
                    <div class="colonne4 last">
                    	 <div class="block_spec">
                    		<div class="infos_spec">
                    			<p class="gras">Evaluation du risque commercial <span class="extra_space">par G2 de Compass</span></p>
                    		</div>
                            <div class="details_spec">
                                <span class="{{ class.COMP }}">{{ valueFrs.record.G2Scores_CompassScore }}</span>
                    		    <a class="bottom_text" href="{{ path('API.BVD.indicateurCompass',{idFournisseur:code_fournisseur}) }}">{{ 'Voir détail' | trad }}</a>
                            </div>
                    	</div>
                    </div>
                </div>
                <hr>
                
                <table class="table">
                	<thead>
                    	<tr>
                        	<th scope="col" width="25%">{{ 'Profil financier' | trad }}</th>
                            <th scope="col" width="15%" align="right" colspan="2">{{ '31/12/'~(profilFinancier.record.YEAR_LAST_ACCOUNTS)~' EUR '~'12 Mois local GAAP' | trad }}</th>
                            <th scope="col" width="15%" align="right" colspan="2">{{ '31/12/'~(profilFinancier.record.YEAR_LAST_ACCOUNTS | convertInt -1 )~' EUR '~'12 Mois local GAAP' | trad }}</th>
                            <th scope="col" width="15%" align="right">{{ '31/12/'~(profilFinancier.record.YEAR_LAST_ACCOUNTS | convertInt -2 )~' EUR '~'12 Mois local GAAP' | trad }}</th>
         				</tr>
                    </thead>
                    <tbody>                                
                    	<tr>
                        	<td align="left">{{ 'Total des prods d\'exploitation' | trad }}</td>
                            <td align="right">{{ profilFinancier.record.OPRE.0 | tva }}</td>
                            <td>{{ tendance('+', profilFinancier.record.OPRE.0| convertFloat, profilFinancier.record.OPRE.1| convertFloat) }}</td>
                            <td align="right">{{ profilFinancier.record.OPRE.1 | tva }}</td>
                            <td>{{ tendance('+', profilFinancier.record.OPRE.1| convertFloat, profilFinancier.record.OPRE.2| convertFloat) }}</td>
                            <td  align="right" class="no_parametrage">{{ profilFinancier.record.OPRE.2 | tva }}</td>
         				</tr>
                    	<tr>
                        	<td align="left">{{ 'Résultat courant avant impôts' | trad }}</td>
                            <td align="right">{{ profilFinancier.record.PLBT.0 | tva }}</td>
                            <td>{{ tendance('+', profilFinancier.record.PLBT.0| convertFloat, profilFinancier.record.PLBT.1| convertFloat) }}</td>
                            <td align="right">{{ profilFinancier.record.PLBT.1 | tva }}</td>
                            <td>{{ tendance('+', profilFinancier.record.PLBT.1| convertFloat, profilFinancier.record.PLBT.2| convertFloat) }}</td>
                            <td  align="right" class="no_parametrage">{{ profilFinancier.record.PLBT.2 | tva }}</td>
         				</tr>
                    	<tr>
                        	<td align="left">{{ 'Bénéfice ou perte [= Revenu net]' | trad }}</td>
                            <td align="right">{{ profilFinancier.record.PL.0 | tva }}</td>
                            <td>{{ tendance('+', profilFinancier.record.PL.0| convertFloat, profilFinancier.record.PL.1| convertFloat) }}</td>
                            <td align="right">{{ profilFinancier.record.PL.1 | tva }}</td>
                            <td>{{ tendance('+', profilFinancier.record.PL.1| convertFloat, profilFinancier.record.PL.2| convertFloat) }}</td>
                            <td  align="right" class="no_parametrage">{{ profilFinancier.record.PL.2 | tva }}</td>
         				</tr>
                    	<tr>
                        	<td align="left">{{ 'Capacité d\'autofin. avant rép.' | trad }}</td>
                            <td align="right">{{ profilFinancier.record.CF.0 | tva }}</td>
                            <td>{{ tendance('+', profilFinancier.record.CF.0| convertFloat, profilFinancier.record.CF.1| convertFloat) }}</td>
                            <td align="right">{{ profilFinancier.record.CF.1 | tva }}</td>
                            <td>{{ tendance('+', profilFinancier.record.CF.1| convertFloat, profilFinancier.record.CF.2| convertFloat) }}</td>
                            <td  align="right" class="no_parametrage">{{ profilFinancier.record.CF.2 | tva }}</td>
         				</tr>
                    	<tr>
                        	<td align="left">{{ 'Total de l\'actif' | trad }}</td>
                            <td align="right">{{ profilFinancier.record.TOAS.0 | tva }}</td>
                            <td>{{ tendance('+', profilFinancier.record.TOAS.0| convertFloat, profilFinancier.record.TOAS.1| convertFloat) }}</td>
                            <td align="right">{{ profilFinancier.record.TOAS.1 | tva }}</td>
                            <td>{{ tendance('+', profilFinancier.record.TOAS.1| convertFloat, profilFinancier.record.TOAS.2| convertFloat) }}</td>
                            <td  align="right" class="no_parametrage">{{ profilFinancier.record.TOAS.2 | tva }}</td>
         				</tr>
                    	<tr>
                        	<td align="left">{{ 'Capitaux propres' | trad }}</td>
                            <td align="right">{{ profilFinancier.record.SHFD.0 | tva }}</td>
                            <td>{{ tendance('+', profilFinancier.record.SHFD.0| convertFloat, profilFinancier.record.SHFD.1| convertFloat) }}</td>
                            <td align="right">{{ profilFinancier.record.SHFD.1 | tva }}</td>
                            <td>{{ tendance('+', profilFinancier.record.SHFD.1| convertFloat, profilFinancier.record.SHFD.2| convertFloat) }}</td>
                            <td  align="right" class="no_parametrage">{{ profilFinancier.record.SHFD.2 | tva }}</td>
         				</tr>
         				
                    	<tr>
                        	<td align="left">{{ 'Liquidité reduite (x)' | trad }}</td>
                            <td align="right">{{ profilFinancier.record.CURR.0 | tva }}</td>
                            <td>{{ tendance('+', profilFinancier.record.CURR.0| convertFloat, profilFinancier.record.CURR.1| convertFloat) }}</td>
                            <td align="right">{{ profilFinancier.record.CURR.1 | tva }}</td>
                            <td>{{ tendance('+', profilFinancier.record.CURR.1| convertFloat, profilFinancier.record.CURR.2| convertFloat) }}</td>
                            <td  align="right" class="no_parametrage">{{ profilFinancier.record.CURR.2 | tva }}</td>
         				</tr>
                    	<tr>
                        	<td align="left">{{ 'Performance' | trad }}</td>
                            <td align="right">{{ profilFinancier.record.PRMA.0 | tva }}%</td>
                            <td>{{ tendance('+', profilFinancier.record.PRMA.0| convertFloat, profilFinancier.record.PRMA.1| convertFloat) }}</td>
                            <td align="right">{{ profilFinancier.record.PRMA.1 | tva }}%</td>
                            <td>{{ tendance('+', profilFinancier.record.PRMA.1| convertFloat, profilFinancier.record.PRMA.2| convertFloat) }}</td>
                            <td  align="right" class="no_parametrage">{{ profilFinancier.record.PRMA.2 | tva }}%</td>
         				</tr>
                    	<tr>
                        	<td align="left">{{ 'Rend. des capitaux propres nets' | trad }}</td>
                            <td align="right">{{ profilFinancier.record.RSHF.0 | tva }}%</td>
                            <td>{{ tendance('+', profilFinancier.record.RSHF.0| convertFloat, profilFinancier.record.RSHF.1| convertFloat) }}</td>
                            <td align="right">{{ profilFinancier.record.RSHF.1 | tva }}%</td>
                            <td>{{ tendance('+', profilFinancier.record.RSHF.1| convertFloat, profilFinancier.record.RSHF.2| convertFloat) }}</td>
                            <td  align="right" class="no_parametrage">{{ profilFinancier.record.RSHF.2 | tva }}%</td>
         				</tr>
                    	<tr>
                        	<td align="left">{{ 'Rend. du capital investi' | trad }}</td>
                            <td align="right">{{ profilFinancier.record.RCEM.0 | tva }}%</td>
                            <td>{{ tendance('+', profilFinancier.record.RCEM.0| convertFloat, profilFinancier.record.RCEM.1| convertFloat) }}</td>
                            <td align="right">{{ profilFinancier.record.RCEM.1 | tva }}%</td>
                            <td>{{ tendance('+', profilFinancier.record.RCEM.1| convertFloat, profilFinancier.record.RCEM.2| convertFloat) }}</td>
                            <td  align="right" class="no_parametrage">{{ profilFinancier.record.RCEM.2 | tva }}%</td>
         				</tr>
                    	<tr>
                        	<td align="left">{{ 'Ratio de solvabilité' | trad }}</td>
                            <td align="right">{{ profilFinancier.record.SOLR.0 | tva }}%</td>
                            <td>{{ tendance('+', profilFinancier.record.SOLR.0| convertFloat, profilFinancier.record.SOLR.1| convertFloat) }}</td>
                            <td align="right">{{ profilFinancier.record.SOLR.1 | tva }}%</td>
                            <td>{{ tendance('+', profilFinancier.record.SOLR.1| convertFloat, profilFinancier.record.SOLR.2| convertFloat) }}</td>
                            <td  align="right" class="no_parametrage">{{ profilFinancier.record.SOLR.2 | tva }}%</td>
         				</tr>
                    	<tr>
                        	<td align="left">{{ 'Effectifs' | trad }}</td>
                            <td align="right">{{ profilFinancier.record.EMPL.0 | tva }}</td>
                            <td>{{ tendance('+', profilFinancier.record.EMPL.0| convertFloat, profilFinancier.record.EMPL.1| convertFloat) }}</td>
                            <td align="right">{{ profilFinancier.record.EMPL.1 | tva }}</td>
                            <td>{{ tendance('+', profilFinancier.record.EMPL.1| convertFloat, profilFinancier.record.EMPL.2| convertFloat) }}</td>
                            <td  align="right" class="no_parametrage">{{ profilFinancier.record.EMPL.2 | tva }}</td>
         				</tr>
                    </tbody>
                </table>
                
                {{ specifique('HtmlExtension', 'specifiqueBVD', {'profilFinancier' : profilFinancier.record , 'valueFrs' : valueFrs.record, 'code_frns' : code_fournisseur}) }}
                
            </div>
        </div>
    </div>
{% endblock %}