présentaiton sous forme de tableau des consommation passé dans les rapports

This commit is contained in:
2020-06-17 14:48:18 +02:00
parent f944981109
commit 7edbdbd3e7
2 changed files with 60 additions and 35 deletions

View File

@@ -125,39 +125,65 @@
</div>
<div class="card-body">
<h4>RAPPORT</h4>
<h3>RAPPORT</h3>
<div class="small">
<h4>CONSOMMATION PASSEE</h4>
{% if project.hors!=0 %}
consommé avant = {{ project.hors }}<br>
Consommation précédente totale = {{ project.hors }}<br>
{% endif %}
{% set bycolonne = max(10,((project.before|length)/3)|round) %}
{% set compteur = 0 %}
<table>
{% for year in project.before %}
<tr class="text-center">
<td class="text-center">
Date
</td>
{% for month in year %}
<td class="text-center">
{{ month.monthlabel }}
</td>
{% endfor %}
</tr>
<tr class=" text-center">
<td class="text-center">
Consommé
</td>
{% for month in year %}
<td class="text-center">
{{ month.duration }}
</td>
{% endfor %}
</tr>
{% endfor %}
</table>
<div class="row">
<div class="col-md-4">
{% for month in project.before %}
{% set compteur = compteur + 1 %}
{% if compteur > bycolonne %}
</div>
<div class="col-md-4">
{% set compteur = 1 %}
{% endif %}
consommé le {{ month.monthlabel }} = {{ month.duration }}<br>
{% endfor %}
</div>
</div>
</div>
{% if not project.beforeastreinte is empty %}
<h4>ASTREINTE</h4>
{% set compteur = 0 %}
<div class="small">
{% for month in project.beforeastreinte %}
consommé le {{ month.monthlabel }} = {{ month.duration }}<br>
<h4>ASTREINTES</h4>
<table>
{% for year in project.before %}
<tr class="text-center">
<td class="text-center">
Date
</td>
{% for month in year %}
<td class="text-center">
{{ month.monthlabel }}
</td>
{% endfor %}
</tr>
<tr class=" text-center">
<td class="text-center">
Consommé
</td>
{% for month in year %}
<td class="text-center">
{{ month.duration }}
</td>
{% endfor %}
</tr>
{% endfor %}
</div>
</table>
{% endif %}
<div class="new-page">&nbsp;</div>