listing last sellings

This commit is contained in:
Kayn Ty 2018-04-19 10:57:01 +02:00
parent a670aa1488
commit 54d0dc1de7
3 changed files with 44 additions and 8 deletions

View File

@ -22,7 +22,6 @@
{% block body %}
{% endblock %}
</div>
</div>
{% block javascripts %}
<script src="{{ asset('build/app.js') }}"></script>

View File

@ -6,9 +6,7 @@
<main>
<div id="container" class="container">
<header>
{% include 'default/header.html.twig' %}
</header>
<main>
{% include 'default/main-screen.html.twig' %}
</main>

View File

@ -11,25 +11,27 @@
<div class="col-xs-6">
<div class="sells">
<h2>
<div class="badge">
<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="badge">
<div class="chiffre">
{{ chiffreAffaires }}
</div>
</h2>
<h2>
<i class="fa fa-shopping-cart"></i>
panier moyen
<div class="badge">
<div class="chiffre">
{{ chiffreAffaires / (recentSells |length) }}
</div>
</h2>
<div>
</div>
</div>
</div>
@ -38,6 +40,43 @@
<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>