affichage de l'historique de ses propres paiements pour chaque transaction
authorPascal Corpet <pascal.corpet@m4x.org>
Fri, 10 Jun 2005 13:44:41 +0000 (13:44 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 26 Jun 2008 21:29:11 +0000 (23:29 +0200)
git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-694

htdocs/paiement/index.php
templates/paiement/index.tpl

index 7186aec..0d1c1cb 100644 (file)
@@ -42,6 +42,10 @@ if (($e = $pay->check($val)) !== true) {
 if ($op=='submit') {
     $pay->init($val, $meth);
     $pay->prepareform($pay);
+} else {
+    $res = $globals->xdb->iterator("SELECT timestamp, montant FROM paiement.transactions WHERE uid = {?} AND ref = {?} ORDER BY timestamp DESC", Session::getInt('uid', -1), Env::getInt('ref', -1));
+    
+    if ($res->total()) $page->assign('transactions', $res);
 }
 
 $page->assign('montant',$val);
index ece1d40..42e1a82 100644 (file)
@@ -124,6 +124,19 @@ recevras une confirmation par email.
   </table>
 </form>
 
+{if $transactions}
+<p class="descr">Tu as déjà effecuté des paiements pour cette transaction :</p>
+<table class="bicol">
+<tr><th>Date</th><th>Montant</th></tr>
+{iterate from=$transactions item=t}
+  <tr class="{cycle values="pair,impair"}">
+    <td>{$t.timestamp|date_format}</td>
+    <td>{$t.montant}</td>
+  </tr>
+{/iterate}
+</table>
+{/if}
+
 {/if}