{% extends 'layout.twig' %}
{% macro texteBR(str) %}
    {%- if str is not empty -%}
        {{ str }}<br/>
    {%- endif -%}
{% endmacro %}
{% block body %}
<style>
.infoLegalSousTitre
{
    font-size: 12px;
    margin-top: 13px;
    color: rgba(0, 0, 0, 0.54);
}
.infoLegalvalue
{
    color: rgba(0, 0, 0, 0.87);
    font-size: 15px;

}

</style>
<div class="contenu clearfix"  id="fournisseurs">
	<h1>
    	{{ 'Fournisseurs' | trad }}
    </h1>
    

    {{ ariane() }}
    
    <div class="tab-content">
        <div id="detail_fournisseur" class="clearfix">
            <h2>{{ 'Fournisseur' | trad }}  : {{ libelle_fournisseur??libelle }} ({{ code_fournisseur??id }})</h2>
            
            {{ arianeSub() }}
            {% if messageError== '' %}
                <span style="color:green;position: absolute;right: 148px;top: 200px;font-size: 20px;"><img src="{{ baseUrl('img/icon/arrow'~tendance~'.png') }}"  width="30px"/></span>
                <span style="color:green;position: absolute;right: 94px;top: 199px;font-size: 26px;"><strong><i>{{ score }}</i></strong></span>
                <span style="color:green;position: absolute;right: 82px;top: 211px;font-size: 13px;"><strong><i>/</i></strong></span>
                <span style="color:green;position: absolute;right: 60px;top: 211px;font-size: 15px;"><strong><i>20</i></strong></span>
                <span style="color:green;position: absolute;right: 59px;top: 234px;font-size: 15px;"><i>{{ risque }}</i></span>
            {% endif %}
  
    
        {% if messageError== '' %}
        </div>
            <div id="interactions" style="text-align:center;margin-bottom: 15px;" class="clearfix">

                <div class="tuilesIndicateur" style="width: 30%;" >
                    <div class="titreTuile">{{ 'Avis de crédit max. recommandé' | trad}}</div>
                    <div class="resultTuile texteTuilebleu">{{ societe['score']['creditLimit'] | prix~' '~ societe['financial']['currency']}}</div>
                </div>
                
                <div class="tuilesIndicateur" style="width: 30%;" >
                    <div class="titreTuile">{{ 'Comportement de paiement vs secteur' | trad}}</div>
                    <div class="resultTuile texteTuilebleu" style="font-size:25px">
                       
                        
                        {% if societe['score']['delaiReglementFournisseur'] %}
                            {% if societe['score']['delaiReglementFournisseur'] > societe['score']['delaiReglementFournisseurSecteur'] %}
                                    <span style="color:red">
                            {% else %}
                                    <span>
                            {% endif %}
                            {{ societe['score']['delaiReglementFournisseur']~' '~'jours' | trad }} 

                        {% else %}
                            <span style="color:#b6b6b6">
                                <i>{{ 'NC' | trad }}</i>
                        {% endif %}
                        </span> <span style="color:#5F5F5F">&nbsp;VS&nbsp;</span> {{societe['score']['delaiReglementFournisseurSecteur']~' '~'jours' | trad}}</div>
                </div>
                <div class="tuilesIndicateur" style="width: 30%;" >
                    <div class="titreTuile">{{ 'Risque de défaillance moyen' | trad}}</div>
                    <div class="resultTuile texteTuilebleu">{{ societe['score']['previous']}}</div>
                </div>
                    
            
            </diV>
            
        <div class="tab-content">
       
        	<div style="width:90%;text-align:center">
                {{ Highcharts(dataHighchart) }}
            </div>
        </div>

        <div class="tab-content">   
            <h3>
                {{ 'Analyse de solvabilité' | trad }}
            </h3>
            <div class="infoLegalSousTitre" >{{ 'Analyse structurelle' | trad }}</div>
            <div class="infoLegalvalue" >{{ _self.texteBR(societe.score.comments.FIN_13) }}
                {{ _self.texteBR(societe.score.comments.NAF_10)  }}
                {{ _self.texteBR(societe.score.comments.LFI_1) }}
            </div>

            <hr />
            <div class="infoLegalSousTitre" >{{ 'Comportements de paiement' | trad }}</div>
            <div class="infoLegalvalue" >{{ _self.texteBR(societe.score.comments.COP_8) }}</div>

            
            <hr />
            <div class="infoLegalSousTitre" >{{ 'Analyse financière' | trad }}</div>
            <div class="infoLegalvalue" >{{ _self.texteBR(societe.score.comments.FIN_13) }}
                {{ _self.texteBR(societe.score.comments.FIN_102) }}
                {{ _self.texteBR(societe.score.comments.FIN_62) }}


            </div>

            <hr />  <div class="infoLegalSousTitre" >{{ 'Recommandations' | trad }}</div>
            <div class="infoLegalvalue" >{{ _self.texteBR(societe.score.comments.REL_4) }}</div>

            <hr />
        </div>
    
            


        <div class="" style="margin-right:4%;float: left;width:48%">
            
            <h3>
                {{ 'Informations générales' | trad }}
            </h3>

            <div class="infoLegalSousTitre" >{{ 'Complément' | trad }}</div>
            <div class="infoLegalvalue" >{{ societe['identity']['name'] }}</div>

            <div class="infoLegalSousTitre" >{{ 'Siège social' | trad }}</div>
            <div class="infoLegalvalue" >{{ societe['identity']['address']['street'] ~ ' '
                ~ societe['identity']['address']['postalCode'] ~ ' '
                ~ societe['identity']['address']['locality'] ~ ' '
                ~ societe['identity']['address']['country'] }}
            </div>

            <div class="infoLegalSousTitre" >{{ 'Téléphone' | trad }}</div>
            <div class="infoLegalvalue" >{{ societe['identity']['contact']['phone'] }}
            </div>

            <div class="infoLegalSousTitre" >{{ 'Site Web' | trad }}</div>
            <div class="infoLegalvalue" >{{ societe['identity']['contact']['webSite'] }}
            </div>

            <hr />

            <h3>
                    {{ 'Informations juridiques' | trad }}
            </h3>
            
            <div class="infoLegalSousTitre" >{{ 'RCS' | trad }}</div>
            <div class="infoLegalvalue" >{{ societe['identity']['rcs'] }}
            </div>

            <div class="infoLegalSousTitre" >{{ 'Forme Juridique' | trad }}</div>
            <div class="infoLegalvalue" >{{ societe['identity']['legalForm']['label'] }}
            </div>


            <div class="infoLegalSousTitre" >{{ 'Catégorie' | trad }}</div>
            <div class="infoLegalvalue" >{{ societe['identity']['tags']['0']['label'] }}
            </div>

            <div class="infoLegalSousTitre" >{{ 'Capital Social' | trad }}</div>
            <div class="infoLegalvalue" >{{ societe['identity']['capital'] | prix~' '~ societe['financial']['currency'] }}
            </div>


            <div class="infoLegalSousTitre" >{{ 'Date de création' | trad }}</div>
            <div class="infoLegalvalue" >{{ societe['identity']['creationDate'] | dateTradAPI }}
            </div>


            <div class="infoLegalSousTitre" >{{ 'Activité principale' | trad }}</div>
            <div class="infoLegalvalue" >{{ societe['identity']['activity']['label']~' ('~ societe['identity']['activity']['code']~')'}}
            </div>

            <div class="infoLegalSousTitre" >{{ 'N° de T.V.A' | trad }}</div>
            <div class="infoLegalvalue" >{{ societe['identity']['vatnumber'] }}
            </div>

            <hr />

        </diV>
        <div style="float:right;width:48%">
              
            <h3>
                {{ 'Dirigeant principal' | trad }}
            </h3>
        

            <div class="infoLegalSousTitre" >{{ 'Dirigeant - Fonction' | trad }}</div>
            <div class="infoLegalvalue" >{{ societe['mandataire']['name']~' '~ societe['mandataire']['firstname'] ~ ' - '~societe['mandataire']['fonction']['label'] }}
            </div>

            <hr />
            <h3>
                {{ 'Informations financières' | trad }}
            </h3>
            

            <div class="infoLegalSousTitre" >{{ "Chiffre d'affaires au" | trad~' '~ societe['financial']['closingDate'] | dateTradAPI }}</div>
            <div class="infoLegalvalue" >{{ (societe['financial']['netIncome']  | prix )~' '~ societe['financial']['currency']  }}
            </div>

            <div class="infoLegalSousTitre" >{{ 'Effectifs' | trad }}</div>
            <div class="infoLegalvalue" >{{ societe['identity']['workforce']['value']  }}
            </div>

        
            <hr />
            <h3>
                {{ 'Informations capitalistiques' | trad }}
            </h3>

 
            <div class="infoLegalSousTitre" >{{ 'Groupe' | trad }}</div>
            <div class="infoLegalvalue" >{{ societe['groupInfo']['companyName']~' ('~societe['groupInfo']['registrationId']~')' }}
            </div>

 
            <div class="infoLegalSousTitre" >{{ 'Effectifs consolidés Groupe' | trad }}</div>
            <div class="infoLegalvalue" >{{ societe['groupInfo']['groupWorkforce']  }}
            </div>

 
            <div class="infoLegalSousTitre" >{{ "Chiffre d'Affaires consolidé Groupe" | trad }}</div>
            <div class="infoLegalvalue" >{{ societe['groupInfo']['groupTurnover'] | prix~' '~ societe['financial']['currency']   }}
            </div>
 
            <div class="infoLegalSousTitre" >{{ 'Actionnaires' | trad }}</div>
            <div class="infoLegalvalue" >{{ societe['links']['counts']['shareholders']  }}
            </div>
 
            <div class="infoLegalSousTitre" >{{ 'Filiales directes' | trad }}</div>
            <div class="infoLegalvalue" >{{ societe['links']['counts']['directSubsidiaries']  }}
            </div>
            

            <div class="infoLegalSousTitre" >{{ 'Filiales directes et indirectes' | trad }}</div>
            <div class="infoLegalvalue" >{{ societe['links']['counts']['indirectSubsidiaries']  }}
            </div>
            
             
        </diV>
        
    </div>
    <div style="float:left;width:100%">
        
        <h3>
            {{ 'Etablissements' | trad }}
        </h3>

        <table class="table" id='tabble_CA'>
            <thead>
                <tr>
                    <th scope="col" width="15%">{{ 'NIC' | trad }}</th>
                    <th scope="col "width="8%">{{ 'Statut' | trad }}</th>
                    <th scope="col" width="15%">{{ 'Enseigne' | trad }}</th>
                    <th scope="col" width="15%">{{ 'Adresse' | trad }}</th>
                    <th scope="col" width="15%">{{ 'CP' | trad }}</th>
                    <th scope="col" width="15%">{{ 'Ville' | trad }}</th>
                    <th scope="col" width="5%">{{ 'Effectifs' | trad }}</th>
                    <th scope="col" width="15%">{{ 'Création' | trad }}</th>
                    <th scope="col" width="15%">{{ 'Fermeture' | trad }}</th>
                 </tr>
            </thead>
            <tbody> 

                
            {% for site in sites %}     
                <tr>
                    
                        <td>{{ site.siteNumber}}</td>  

                        <td>{% if site.status %}{{ 'Ouvert' | trad }}{% else %}{{ 'Fermer' | trad }}{% endif %}</td>
                        <td>{{ site.commercialName}}</td>  
                        <td>{{ site.address.street}}</td>  
                        <td>{{ site.address.postalCode}}</td>  
                        <td>{{ site.address.locality}}</td>  
                        <td>{{ site.workforce.range}}</td>  
                        <td>{{ site.creationDate| dateTradAPI }}</td>  
                        <td>{{ site.closingDate| dateTradAPI }}</td>  
                </tr>

            {% endfor %}
            </tbody>
        </table>

    </div>



    <div style="float:left;width:100%">
        
        <h3>
            {{ 'Ratios financiers' | trad }}
        </h3>

        <table class="table" id='tabble_CA'>
            <thead>
                <tr>
                    <th scope="col" width="15%"></th>
                    <th scope="col" width="15%">{{'Avis' | trad}}</th>
                    <th scope="col" width="15%"></th>

                    {% for balance in balances %}     
                    
                    <th scope="col "width="8%">{{ balance.closingDate| dateTradAPI }}</th>
                    
                    {% endfor %}
                 </tr>
            </thead>
            <tbody> 

                <tr>
                    <td scope="col" style="background-color:#efefef;font-size:17px;color:#5f5f5f" colspan ="{{ countBalances }}"  width="15%">{{ 'Eléments financiers' | trad }}</td>
                 </tr>
                
                <tr>
                    

                    <td>{{ 'Chiffre d\'affaires' | trad }}</td>
                    <th scope="col" width="15%"></th>
                    <td scope="col">{{ tendance(
                            '+',
                            balances[0].returnBalance.turnover ,
                            balancesLastYear.returnBalance.turnover
                        ) }}</td>
               
                        {% for balance in balances %}     
                            <td class="montant" >{{ balance.returnBalance.turnover | prix ~' '~societe['financial']['currency']}}</td>  
                        {% endfor %}
                </tr>

                    
                <tr>
                    <td>{{ 'Résultat d\'exploitation' | trad }}</td>
           
                    <th scope="col" width="15%"></th>
                    <td scope="col">{{ tendance(
                            '+',
                            balances[0].returnBalance.operatingIncome ,
                            balancesLastYear.returnBalance.operatingIncome
                        ) }}</td>
                    {% for balance in balances %}     
                        <td class="montant" >{{ balance.returnBalance.operatingIncome | prix ~' '~societe['financial']['currency']}}</td>  
                    {% endfor %}
                </tr>
                <tr>
                    <td>{{ 'Charges financières' | trad }}</td>
           
                    <th scope="col" width="15%"></th>
                    <td scope="col">{{ tendance(
                            '-',
                            balances.0.returnBalance.financialExpenses ,
                            balancesLastYear.returnBalance.financialExpenses
                        ) }}</td>
                    {% for balance in balances %}     
                        <td class="montant" >{{ balance.returnBalance.financialExpenses | prix ~' '~societe['financial']['currency']}} </td>  
                    {% endfor %}
                </tr>
                <tr>
                    <td>{{ 'Résultat net' | trad }}</td>
           
                    <th scope="col" width="15%"></th> 
                     <td scope="col">{{ tendance(
                            '+',
                            balances[0].returnBalance.netIncome ,
                            balancesLastYear.returnBalance.netIncome
                        ) }}</td>
                    {% for balance in balances %}     
                        <td class="montant" >{{ balance.returnBalance.netIncome | prix ~' '~societe['financial']['currency']}}</td>  
                    {% endfor %}
                </tr>
                <tr>
                    <td>{{ 'Capitaux propres' | trad }}</td>
           
                    <th scope="col" width="15%"></th>
                    <td scope="col">{{ tendance(
                            '+',
                            balances[0].returnBalance.equity ,
                            balancesLastYear.returnBalance.equity
                        ) }}</td>
                    {% for balance in balances %}     
                        <td class="montant" >{{ balance.returnBalance.equity | prix ~' '~societe['financial']['currency']}}</td>  
                    {% endfor %}
                </tr>
                <tr>
                    <td>{{ 'Effectifs' | trad }}</td>
           
                    <th scope="col" width="15%"></th>
                    <td scope="col">{{ tendance(
                            '+',
                            balances[0].returnBalance.workforce ,
                            balancesLastYear.returnBalance.workforce
                        ) }}</td>
                    {% for balance in balances %}     
                        <td class="montant">{{ balance.returnBalance.workforce}}</td>  
                    {% endfor %}
                </tr>
                
                <tr>
                    <td scope="col" style="background-color:#efefef;font-size:17px;color:#5f5f5f" colspan ="{{ countBalances }}"  width="15%">{{ 'indicateurs de solvabilité' | trad }}</td>
                 </tr>

                 <tr>
                    <td>{{ 'Marge d\'exploitation' | trad }}</td>
           
                    <th scope="col" width="15%">{{ avis.operationalMargin  | avis | raw }}</th>
                    <td scope="col">{{ tendance(
                            '+',
                            balances[0].returnBalance.operationalMargin ,
                            balancesLastYear.returnBalance.operationalMargin
                        ) }}</td>
                    {% for balance in balances %}     
                        <td class="montant">{{ balance.returnBalance.operationalMargin | prix}} %</td>  
                    {% endfor %}
                </tr>

                <tr>
                    <td>{{ 'Marge nette' | trad }}</td>
           
                    <th scope="col" width="15%">{{ avis.netMargin  | avis | raw }}</th>
                    <td scope="col">{{ tendance(
                            '+',
                            balances[0].returnBalance.netMargin ,
                            balancesLastYear.returnBalance.netMargin
                        ) }}</td>
                    {% for balance in balances %}     
                        <td class="montant">{{ balance.returnBalance.netMargin | prix}} %</td>  
                    {% endfor %}
                </tr>

                <tr>
                    <td>{{ 'Excédent brut d\'exploitation (EBE)' | trad }}</td>
           
                    <th scope="col" width="15%">{{ avis.grossOperatingSurplus  | avis | raw }}</th>
                    <td scope="col">{{ tendance(
                            '+',
                            balances[0].returnBalance.grossOperatingSurplus ,
                            balancesLastYear.returnBalance.grossOperatingSurplus
                        ) }}</td>
                    {% for balance in balances %}     
                        <td class="montant" >{{ balance.returnBalance.grossOperatingSurplus | prix ~' '~societe['financial']['currency'] }}</td>  
                    {% endfor %}
                </tr>

                <tr>
                    <td>{{ 'Poids du CA/Capitaux propres' | trad }}</td>
           
                    <th scope="col" width="15%">{{ avis.revenueEquityRatio  | avis | raw }}</th>
                    <td scope="col">{{ tendance(
                            '+',
                            balances[0].returnBalance.revenueEquityRatio ,
                            balancesLastYear.returnBalance.revenueEquityRatio
                        ) }}</td>
                    {% for balance in balances %}     
                        <td class="montant">{{ balance.returnBalance.revenueEquityRatio | prix}}</td>  
                    {% endfor %}
                </tr>

                <tr>
                    <td>{{ 'Vétusté des actifs immobilisés' | trad }}</td>
           
                    <th scope="col" width="15%">{{ avis.fixedAssetsObsolescence  | avis | raw }}</th>
                    <td scope="col">{{ tendance(
                            '+',
                            balances[0].returnBalance.fixedAssetsObsolescence ,
                            balancesLastYear.returnBalance.fixedAssetsObsolescence
                        ) }}</td>
                    {% for balance in balances %}     
                        <td class="montant">{{ balance.returnBalance.fixedAssetsObsolescence | prix}} %</td>  
                    {% endfor %}
                </tr>
                
                
                <tr>
                    <td scope="col" style="background-color:#efefef;font-size:17px;color:#5f5f5f" colspan ="{{ countBalances }}"  width="15%">{{ 'indicateurs de solvabilité' | trad }}</td>
                 </tr>


                 <tr>
                    <td>{{ 'Capacité d\'autofinancement (CAF)' | trad }}</td>
           
                    <th scope="col" width="15%">{{ avis.cashFlow  | avis | raw }}</th>
                    <td scope="col">{{ tendance(
                            '+',
                            balances[0].returnBalance.cashFlow ,
                            balancesLastYear.returnBalance.cashFlow
                        ) }}</td>
                    {% for balance in balances %}     
                        <td class="montant" >{{ balance.returnBalance.cashFlow | prix  ~' '~societe['financial']['currency']}}</td>  
                    {% endfor %}
                </tr>

                <tr>
                    <td>{{ 'Autonomie financière' | trad }}</td>
           
                    <th scope="col" width="15%">{{ avis.financialAutonomy  | avis | raw }}</th>
                    <td scope="col">{{ tendance(
                            '+',
                            balances[0].returnBalance.financialAutonomy ,
                            balancesLastYear.returnBalance.financialAutonomy
                        ) }}</td>
                    {% for balance in balances %}     
                        <td class="montant">{{ balance.returnBalance.financialAutonomy | prix}}</td>  
                    {% endfor %}
                </tr>
                <tr>
                    <td>{{ 'Capacité de remboursement' | trad }}</td>
           
                    <th scope="col" width="15%">{{ avis.repaymentCapacity  | avis | raw }}</th>
                    <td scope="col">{{ tendance(
                            '+',
                            balances[0].returnBalance.repaymentCapacity ,
                            balancesLastYear.returnBalance.repaymentCapacity
                        ) }}</td>
                    {% for balance in balances %}     
                        <td class="montant">{{ balance.returnBalance.repaymentCapacity | prix ~' '~'ans' | trad}}</td>
                    {% endfor %}
                </tr>
                <tr>
                    <td>{{ 'Solvabilité générale' | trad }}</td>
           
                    <th scope="col" width="15%">{{ avis.generalCreditworthiness  | avis | raw }}</th>
                    <td scope="col">{{ tendance(
                            '+',
                            balances[0].returnBalance.generalCreditworthiness ,
                            balancesLastYear.returnBalance.generalCreditworthiness
                        ) }}</td>
                    {% for balance in balances %}     
                        <td class="montant">{{ balance.returnBalance.generalCreditworthiness | prix}}</td>  
                    {% endfor %}
                </tr>

                <tr>
                    <td>{{ 'Liquidité générale' | trad }}</td>
                    
                    
                    <th scope="col" width="15%">{{ avis.currentRatio | avis | raw }}</th>
                    <td scope="col">{{ tendance(
                            '+',
                            balances[0].returnBalance.currentRatio ,
                            balancesLastYear.returnBalance.currentRatio
                        ) }}</td>
                    {% for balance in balances %}     
                        <td class="montant">{{ balance.returnBalance.currentRatio | prix}}</td>  
                    {% endfor %}
                </tr>

                <tr>
                    <td>{{ 'Liquidité réduite' | trad }}</td>
           
                    <th scope="col" width="15%">{{ avis.restrictedLiquidity | avis | raw }}</th>
                    <td scope="col">{{ tendance(
                            '+',
                            balances[0].returnBalance.restrictedLiquidity ,
                            balancesLastYear.returnBalance.restrictedLiquidity
                        ) }}</td>
                    {% for balance in balances %}     
                        <td class="montant">{{ balance.returnBalance.restrictedLiquidity | prix}} %</td>  
                    {% endfor %}
                </tr>


                <tr>
                    <td>{{ 'Charges financières/CA' | trad }}</td>
           
                    <th scope="col" width="15%">{{ avis.financialExpensesReturnRatio | avis | raw }}</th>
                    <td scope="col">{{ tendance(
                            '-',
                            balances[0].returnBalance.financialExpensesReturnRatio ,
                            balancesLastYear.returnBalance.financialExpensesReturnRatio
                        ) }}</td>
                    {% for balance in balances %}     
                        <td class="montant">{{ balance.returnBalance.financialExpensesReturnRatio | prix}} %</td>  
                    {% endfor %}
                </tr>


                <tr>
                    <td>{{ 'Endettement' | trad }}</td>
           
                    <th scope="col" width="15%">{{ avis.debt | avis | raw }}</th>
                    <td scope="col">{{ tendance(
                            '-',
                            balances[0].returnBalance.debt ,
                            balancesLastYear.returnBalance.debt
                        ) }}</td>
                    {% for balance in balances %}     
                        <td class="montant">{{ balance.returnBalance.debt | prix}} %</td>  
                    {% endfor %}
                </tr>


                <tr>
                    <td>{{ 'Surface financière' | trad }}</td>
           
                    <th scope="col" width="15%">{{ avis.financialStrength | avis | raw }}</th>
                    
                    <td scope="col">{{ tendance(
                            '+',
                            balances[0].returnBalance.financialStrength ,
                            balancesLastYear.returnBalance.financialStrength
                        ) }}</td>
                    {% for balance in balances %}     
                        <td class="montant">{{ balance.returnBalance.financialStrength | prix}} %</td>  
                    {% endfor %}
                </tr>

                <tr>
                    <td>{{ 'Besoin en fonds de roulement (BFR)' | trad }}</td>
           
                    <th scope="col" width="15%">{{ avis.workingCapitalRequirement | avis | raw }}</th>
                    <td scope="col">{{ tendance(
                            '-',
                            balances[0].returnBalance.workingCapitalRequirement ,
                            balancesLastYear.returnBalance.workingCapitalRequirement
                        ) }}</td>
                    {% for balance in balances %}     
                        <td class="montant" >{{ balance.returnBalance.workingCapitalRequirement | prix  ~' '~societe['financial']['currency']}}</td>  
                    {% endfor %}
                </tr>
                

                <tr>
                    <td>{{ 'Rotation du BFR' | trad }}</td>
           
                    <th scope="col" width="15%">{{ avis.workingCapitalRequirementTurnover | avis | raw }}</th>
                    <td scope="col">{{ tendance(
                            '-',
                            balances[0].returnBalance.workingCapitalRequirementTurnover ,
                            balancesLastYear.returnBalance.workingCapitalRequirementTurnover
                        ) }}</td>
                    {% for balance in balances %}     
                        <td class="montant">{{ balance.returnBalance.workingCapitalRequirementTurnover | prix~' '~'jours' | trad}}</td>
                    {% endfor %}
                </tr>


                <tr>
                    <td>{{ 'Délai de règlement clients' | trad }}</td>
           
                    <th scope="col" width="15%">{{ avis.customersPaymentTime | avis | raw }}</th>
                    <td scope="col">{{ tendance(
                            '-',
                            balances[0].returnBalance.customersPaymentTime ,
                            balancesLastYear.returnBalance.customersPaymentTime
                        ) }}</td>
                    {% for balance in balances %}     
                        <td class="montant">{{ balance.returnBalance.customersPaymentTime  | prix~' '~'jours' | trad}}</td>
                    {% endfor %}
                </tr>


                <tr>
                    <td>{{ 'Délai de règlement fournisseurs' | trad }}</td>
           
                    <th scope="col" width="15%">{{ avis.suppliersPaymentTime | avis | raw }}</th>
                    <td scope="col">{{ tendance(
                            '-',
                            balances[0].returnBalance.suppliersPaymentTime ,
                            balancesLastYear.returnBalance.suppliersPaymentTime
                        ) }}</td>
                    {% for balance in balances %}     
                        <td class="montant">{{ balance.returnBalance.suppliersPaymentTime  | prix~' '~'jours' | trad}}</td>
                    {% endfor %}
                </tr>


                
                 
            </tbody>
        </table>

        {% else %}
            <center><h2>{{ messageError }} </h2></center>
        {% endif %}

    </div>

</div>

<script type="text/javascript" src="{{ baseUrl('ext/highcharts/highcharts/highcharts.js') }}"></script>
<script type="text/javascript" src="{{ baseUrl('ext/highcharts/highcharts/modules/exporting.js') }}"></script>
<script type="text/javascript" src="{{ baseUrl('ext/highcharts/highcharts/modules/offline-exporting.js') }}"></script>

{% endblock %}