{% extends "base.html.twig" %} {% block localstyle %} .card { margin: 20px 20px 0px 0px; } .card-body .month { margin: 20px 0px 0px 0px; } .card-body .month:first-child { margin: 0px; } .card-header h2 { float:left; } .card-header .synthese { float:right; font-size:12px; text-align: right; } .card-body h4 { margin: 20px 0px 0px 0px;} .card-body h4:first-child { margin: 0px;} th,td, tfoot { border: 1px solid #37474F; color: #000000; background-color:#cccccc; } .recaptask td, .recapoffer td { background-color:#ffffff; color: #212529; padding: 3px; } .recaptask tfoot td, .recapoffer thead td, .recapoffer tfoot td { background-color:#cccccc; font-weight: bold; } .intervenant { width:200px; padding-left:5px; } .total { text-align:center; width:70px; background-color:#888888; } .day { text-align:center; width: 40px; height:40px; } .astreinte { height: 12px; font-size: 10px; } {% if fgprint is defined and fgprint %} h2, h3 { display:block !important; float:none !important; margin:0px; } table { width:100%; font-size:10px;} .card-header .synthese { float:none !important; text-align:left !important; } .day { height:auto !important; } .small { font-size:10px;} h4 { padding-top: 20px; } {% endif %} {% endblock %} {% block body %} {% if fgprint is defined and fgprint %}

Planning

{%endif%} {% if access=="customer" and not app.user %}
Rapport Planning   Nombre de mois
{% endif %} {% for project in projects %} {% if not project.months is empty or project.hors!=0 or not project.before is empty or not project.beforeastreinte is empty %}

{{ project.displayname }}

Commandé = {{ project.proposed|number_format(2, '.', ' ') }}
Consommé = {{ project.validate|number_format(2, '.', ' ') }}
RESTE = {{ (project.proposed - project.validate)|number_format(2, '.', ' ') }}

RAPPORT

CONSOMMATION PASSEE

{% if project.hors!=0 %} Consommation précédente totale = {{ project.hors }}
{% endif %} {% for year in project.before %} {% for month in year %} {% endfor %} {% for month in year %} {% endfor %} {% endfor %}
Date {{ month.monthlabel }}
Consommé {{ month.duration }}
{% if not project.beforeastreinte is empty %}

ASTREINTES

{% for year in project.before %} {% for month in year %} {% endfor %} {% for month in year %} {% endfor %} {% endfor %}
Date {{ month.monthlabel }}
Consommé {{ month.duration }}
{% endif %}
 
{% for month in project.months %}

{{ month.monthlabel }}

{% for day in month.days %} {% endfor %} {% for user in month.users %} {% for day in user.days %} {% endfor %} {% endfor %}
Intervenant {{ day.daylabel }}
{{ day.daynumber }}
Total
{{ user.displayname }} {% if day.duration > 0 %} {{ day.duration }} {% endif %} {% if day.astreinte > 0 %}
A
{% endif %}
{{user.total}}
{% if month.total > 0 %}
{% for task in month.tasks %} {% endfor %} {% if month.totala > 0 %} {% endif %}
{{ task.displayname }} {{ task.duration|number_format(2, '.', ' ') }}
Astreinte {{ month.totala|number_format(2, '.', ' ') }}
TOTAL {{ (month.total + month.totala)|number_format(2, '.', ' ') }}
{% endif %}
 
{% endfor %} {% if not project.offers is empty %}

COMMANDES

{% set count=(project.offers|length)-8 %} {% set totbefore10=0 %} {% set decoproposed=project.proposed %} {% set decovalidate=project.validate %} {% set tot=0 %} {% for offer in project.offers %} {% if loop.index {% endif %} {% else %} {% if not loop.last %} {% else %} {% endif %} {% endif %} {% endfor %}
Libellé Référence Commandé Consommé Reste
Précédente {{ totbefore10|number_format(2, '.', ' ') }} {% if decovalidate >= totbefore10 %} {{ totbefore10|number_format(2, '.', ' ') }} {% set todel=totbefore10 %} {% else %} {% if decovalidate >= 0 %} {{ decovalidate|number_format(2, '.', ' ') }} {% set todel=decovalidate %} {% else %} 0.00 {% set todel=0 %} {% endif %} {% endif %} {% set decovalidate=decovalidate-totbefore10 %} {{ (totbefore10-todel)|number_format(2, '.', ' ') }} {% set decoproposed=decoproposed-totbefore10 %}
{{ offer.name }} {{ offer.ref }} {{ offer.quantity|number_format(2, '.', ' ') }} {% if decovalidate >= offer.quantity %} {{ offer.quantity|number_format(2, '.', ' ') }} {% set todel=offer.quantity %} {% else %} {% if decovalidate >= 0 %} {{ decovalidate|number_format(2, '.', ' ') }} {% set todel=decovalidate %} {% else %} 0.00 {% set todel=0 %} {% endif %} {% endif %} {% set decovalidate=decovalidate-offer.quantity %} {{ (offer.quantity-todel)|number_format(2, '.', ' ') }} {% set decoproposed=decoproposed-totbefore10 %}
{{ offer.name }} {{ offer.ref }} {{ offer.quantity|number_format(2, '.', ' ') }} {% if decovalidate >= 0 %} {{ decovalidate|number_format(2, '.', ' ') }} {% set todel=decovalidate %} {% else %} 0.00 {% set todel=0 %} {% endif %} {% set decovalidate=decovalidate-offer.quantity %} {{ (offer.quantity-todel)|number_format(2, '.', ' ') }} {% set decoproposed=decoproposed-totbefore10 %}
TOTAL {{ project.proposed|number_format(2, '.', ' ') }} {{ project.validate|number_format(2, '.', ' ') }} {{ (project.proposed - project.validate)|number_format(2, '.', ' ') }}
 
{% endif %}
{% endif %} {% endfor %}
{% endblock %} {% block localjavascript %} function myprint() { href=document.location.href; document.location.href=href+"?fgprint=true"; } {% endblock %}