{% extends "base.html.twig" %} {% block localstyle %} td { padding:5px !important; } {% if fgprint is defined and fgprint %} table { font-size:10px;} th,td { border: 1px solid #37474F; } thead { display: table-header-group; } tr { page-break-inside: avoid; } {%endif%} {% endblock %} {% block body %}

TACHES {% if app.session.get('viewservice') %}PAR ACTVITE{%else%}PAR DOMAINE{%endif%}

Ajouter
{% if app.session.get('viewservice') %} {% else %} {% endif %}

{% if app.session.get('viewservice') %} {% set loop01s=services %} {% else %} {% set loop01s=domaines %} {% endif %} {%for loop01 in loop01s %} {% if not loop01.projects is empty %} {% set havetask=false %} {% set haveproject=false %} {% for project in loop01.projects %} {% if app.session.get('activeproject')==project.active and (app.session.get('idproject')=="all" or app.session.get('idproject')==project.id) %} {% if not project.tasks is empty %} {% set havetask=true %} {% endif %} {% set haveproject=true %} {% endif %} {% endfor %} {% if haveproject and havetask %}
{{ loop01.name }}
{% for project in loop01.projects %} {% if app.session.get('activeproject')==project.active and (app.session.get('idproject')=="all" or app.session.get('idproject')==project.id) %} {% for task in project.tasks %} {% if app.session.get('activetask')==task.active %} {% set totvalidate=task.validate %} {% set totplanified=task.validate %} {% for event in task.events %} {% set totplanified=totplanified+event.duration %} {% if event.validate %} {% set totvalidate=totvalidate+event.duration %} {% endif %} {% endfor %} {% for penalty in task.penaltys %} {% set totplanified=totplanified+penalty.duration %} {% if penalty.validate %} {% set totvalidate=totvalidate+penalty.duration %} {% endif %} {% endfor %} {% endif %} {% endfor %} {% endif %} {% endfor %}
Action Client Nature Projet Tâche Actif Estimation Validé Planifié Reste Couleur
{{task.project.customer.name}} {{task.nature.name}} {{task.project.name}} {{task.name}} {{task.active ? "actif":"non-actif"}} {{task.quantity|number_format(2, '.', ' ')}} {{(totvalidate*-1)|number_format(2, '.', ' ')}} {{((totplanified-totvalidate)*-1)|number_format(2, '.', ' ')}} {{(task.quantity-totplanified)|number_format(2, '.', ' ')}} {{task.color}}

{% endif %} {% endif %} {% endfor %} {% endblock %} {% block localjavascript %} $(document).ready(function() { {% if not fgprint is defined or not fgprint %} $('.table ').DataTable({ columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ], responsive: true, iDisplayLength: 100, order: [[ 1, "asc" ]] }); {%else%} $('#dataTables').removeClass("table table-striped table-bordered table-hover small dataTable no-footer"); {% endif %} }); $('#switchactive').change(function() { window.location="{{ path('app_task_activeproject' )}}"; }); $('#switchactivetask').change(function() { window.location="{{ path('app_task_activetask' )}}"; }); $('#switchservice').change(function() { window.location="{{ path('app_task_viewservice' )}}"; }); function myprint() { href=document.location.href; document.location.href=href+"?fgprint=true"; } {% endblock %}