caisse-bliss/app/Resources/views/logged/history.html.twig

87 lines
3.2 KiB
Twig
Executable File

{% extends 'base.html.twig' %}
{% trans_default_domain 'FOSUserBundle' %}
{% block body %}
<div id="wrapper">
<div id="container" class="container">
<div class="row">
<h1>Historique</h1>
</div>
<div class="row">
<div class="col-xs-6">
<div class="sells">
<h2>
<i class="fa fa-users"></i>
<div class="chiffre">
{{ recentSells |length }}
</div>
Clients
</h2>
<h2>
<i class="fa fa-euro"></i>
Chiffre d'affaires
<div class="chiffre">
{{ chiffreAffaires }}
</div>
</h2>
<h2>
<i class="fa fa-shopping-cart"></i>
panier moyen
<div class="chiffre">
{{ chiffreAffaires / ((recentSells |length) or 1) }}
</div>
</h2>
<div>
</div>
</div>
</div>
<div class="col-xs-6 text-right">
<a class="btn btn-success" href="{{ path('export_all') }}">
<i class="fa fa-file-o fa-3x"></i>
Exporter toutes vos données en format csv
</a>
<h2>
Dernières ventes
</h2>
<div class="table">
<div class="row">
<div class="col-xs-3">
date
</div>
<div class="col-xs-3">
commentaire
</div>
<div class="col-xs-3">
produits
</div>
<div class="col-xs-3">
montant
</div>
</div>
</div>
{% for vente in recentSells %}
<div class="row">
<div class="col-xs-3">
{{ vente.date |date('Y-m-d H:i:s') }}
</div>
<div class="col-xs-3">
{{ vente.comment }}
</div>
<div class="col-xs-3">
{{ vente.productsSold |length }}
</div>
<div class="col-xs-3">
{{ vente.amount }}
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
{% endblock %}