⚡ improve history preview
This commit is contained in:
parent
689c4509b5
commit
eed747f289
|
@ -90,6 +90,7 @@
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td>n°</td>
|
||||||
<td>date</td>
|
<td>date</td>
|
||||||
<td>commentaire</td>
|
<td>commentaire</td>
|
||||||
<td>produits</td>
|
<td>produits</td>
|
||||||
|
@ -105,9 +106,20 @@
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
|
<td> {{ vente.id }}</td>
|
||||||
<td> {{ vente.date |date('Y-m-d H:i:s') }}</td>
|
<td> {{ vente.date |date('Y-m-d H:i:s') }}</td>
|
||||||
<td>{{ vente.comment }}</td>
|
<td>{{ vente.comment }}</td>
|
||||||
<td class="text-right">{{ vente.productsSold |length }}</td>
|
<td class="text-right">
|
||||||
|
{% if vente.productsSold |length >1 %}
|
||||||
|
<strong>
|
||||||
|
{{ vente.productsSold |length }}
|
||||||
|
</strong> produits
|
||||||
|
|
||||||
|
{% else %}
|
||||||
|
{{ vente.productsSold.0.name }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
{{ vente.amount }}
|
{{ vente.amount }}
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -323,7 +323,7 @@ class DefaultController extends Controller
|
||||||
$currentUser = $this->getUser();
|
$currentUser = $this->getUser();
|
||||||
$m = $this->getDoctrine()->getManager();
|
$m = $this->getDoctrine()->getManager();
|
||||||
$sellingRepo = $m->getRepository('AppBundle:SellRecord');
|
$sellingRepo = $m->getRepository('AppBundle:SellRecord');
|
||||||
$allSellingList = $sellingRepo->findByUser($currentUser->getId());
|
$allSellingList = $sellingRepo->findBy(['user'=>$currentUser->getId()],['id'=>'desc']);
|
||||||
$mySellings = array_splice($allSellingList, 0, 15);
|
$mySellings = array_splice($allSellingList, 0, 15);
|
||||||
$chiffreAffaires = 0;
|
$chiffreAffaires = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue