96 lines
3.7 KiB
Twig
Executable File
96 lines
3.7 KiB
Twig
Executable File
{% extends 'base.html.twig' %}
|
|
|
|
{% block body %}
|
|
<div class="row heading-of-list">
|
|
<div class="col-xs-6">
|
|
<h1>Festivals</h1></div>
|
|
<div class="col-xs-6">
|
|
<a class="btn btn-primary" href="{{ path('festival_new') }}">Nouveau festival</a>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<table class="table-responsive table-striped table table-bordered table-light">
|
|
<thead>
|
|
<tr>
|
|
<th>Id</th>
|
|
<th>Name</th>
|
|
<th>Datecreation</th>
|
|
<th>Tous Frais</th>
|
|
<th>Clients</th>
|
|
<th>fond caisse avant</th>
|
|
<th>fond caisse apres</th>
|
|
<th>chiffre affaire</th>
|
|
<th>fond caisse + CA</th>
|
|
<th>diff</th>
|
|
<th>bénefices CA - frais</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
|
|
{% for festival in festivals %}
|
|
<tr
|
|
{% if app.user.activeFestival and (app.user.activeFestival.id == festival.id) %}
|
|
class="bg-success"
|
|
{% endif %}
|
|
>
|
|
<td>
|
|
<a class="btn btn-primary"
|
|
href="{{ path('festival_show', { 'id': festival.id }) }}">{{ festival.id }}</a>
|
|
</td>
|
|
<td>{{ festival.name }}</td>
|
|
<td>{% if festival.dateCreation %}{{ festival.dateCreation|date('Y-m-d H:i:s') }}{% endif %}</td>
|
|
<td>{{ festival.fraisInscription + festival.fraisTransport + festival.fraisRepas + festival.fraisHebergement }}
|
|
€
|
|
</td>
|
|
|
|
<td>{{ festival.sellRecords|length }}</td>
|
|
<td>{{ festival.fondDeCaisseAvant }}€</td>
|
|
<td>{{ festival.fondDeCaisseApres }}€</td>
|
|
<td>{{ festival.chiffreAffaire }}€</td>
|
|
<td>{{ festival.fondDeCaisseAvant + festival.chiffreAffaire }}€</td>
|
|
<td
|
|
class="{% if (festival.chiffreAffaire - festival.fondDeCaisseApres) != 0 %}
|
|
bg-warning
|
|
{% else %}
|
|
bg-success
|
|
{% endif %}"
|
|
>{{ festival.chiffreAffaire - festival.fondDeCaisseApres }}€
|
|
</td>
|
|
<td>{{ festival.chiffreAffaire - (festival.fraisInscription + festival.fraisTransport + festival.fraisRepas + festival.fraisHebergement ) }}</td>
|
|
<td>
|
|
{% if app.user.activeFestival and (app.user.activeFestival.id == festival.id) %}
|
|
<span class="badge badge-success">
|
|
Actuel
|
|
</span>
|
|
{% else %}
|
|
<a class="btn btn-success" href="{{ path('set_active_festival', { 'id': festival.id }) }}">
|
|
choisir comme actuel
|
|
</a>
|
|
{% endif %}
|
|
|
|
{% if festival.user|length %}
|
|
{% for u in festival.user %}
|
|
<span class="badge badge-info">{{ u.username }}</span>
|
|
{% endfor %}
|
|
{% else %}
|
|
<div class="alert alert-info">
|
|
|
|
pas d'owner.
|
|
</div>
|
|
{% endif %}
|
|
<a class="btn btn-primary" href="{{ path('festival_edit', { 'id': festival.id }) }}">
|
|
<i class="fa fa-pencil"></i>
|
|
Modifier
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
<a class="btn btn-primary" href="{{ path('festival_new') }}">Nouveau festival</a>
|
|
{% endblock %}
|