Commit eea113a9 authored by Okhin's avatar Okhin

Split de l'historique en deux tables

parent 32d37caa
...@@ -93,7 +93,7 @@ class Perso extends Controller ...@@ -93,7 +93,7 @@ class Perso extends Controller
{ {
// Chargement des dons de l'utilisateur // Chargement des dons de l'utilisateur
$db = $f3->get('DB'); $db = $f3->get('DB');
$result = $db->query("SELECT datec, somme, id, pdf, status FROM dons WHERE user_id='".$f3->get('infos.id')."' AND status IN (1,4,102) ORDER BY datec ASC"); $result = $db->query("SELECT datec, somme, id, pdf, status FROM dons WHERE user_id='".$f3->get('infos.id')."' AND status IN (1,4,102) ORDER BY datec DESC");
$data = array(); $data = array();
foreach ($result->fetchAll(\PDO::FETCH_ASSOC) as $row) { foreach ($result->fetchAll(\PDO::FETCH_ASSOC) as $row) {
$data[] = $row; $data[] = $row;
......
...@@ -139,14 +139,12 @@ ...@@ -139,14 +139,12 @@
<th>{{ _("Date") }}</th> <th>{{ _("Date") }}</th>
<th>{{ _("Dons") }}</th> <th>{{ _("Dons") }}</th>
<th>{{ _("Récurent") }}</th> <th>{{ _("Récurent") }}</th>
<th>{{ _("Contreparties") }}</th>
</tr> </tr>
<repeat group="{{ @dons_recurrents }}" value="{{ @don }}"> <repeat group="{{ @dons_recurrents }}" value="{{ @don }}">
<tr> <tr>
<td>{{ @don.datec }}</td> <td>{{ @don.datec }}</td>
<td>{{ @don.somme }}</td> <td>{{ @don.somme }}</td>
<td>{{ _("Oui")}}</td> <td>{{ _("Oui")}}</td>
<td></td>
</tr> </tr>
</repeat> </repeat>
<repeat group="{{ @dons }}" value="{{ @don }}"> <repeat group="{{ @dons }}" value="{{ @don }}">
...@@ -154,14 +152,17 @@ ...@@ -154,14 +152,17 @@
<td>{{ @don.datec }}</td> <td>{{ @don.datec }}</td>
<td>{{ @don.somme }}</td> <td>{{ @don.somme }}</td>
<td>{{ _("Non")}}</td> <td>{{ _("Non")}}</td>
<td></td>
</tr> </tr>
</repeat> </repeat>
</table>
<table class="table text-left">
<tr>
<th>{{ _("Date") }}</th>
<th>{{ _("Contreparties") }}</th>
</tr>
<repeat group="{{ @contreparties }}" value="{{ @contrepartie }}"> <repeat group="{{ @contreparties }}" value="{{ @contrepartie }}">
<tr> <tr>
<td>{{ @contrepartie.datec }}</td> <td>{{ @contrepartie.datec }}</td>
<td></td>
<td></td>
<td>{{ @contrepartie.quoi }}</td> <td>{{ @contrepartie.quoi }}</td>
</tr> </tr>
</repeat> </repeat>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment