]> gitweb.pimeys.fr Git - scripts-20-100.git/commitdiff
[transactions.sh] On veut voir leur type
authorVincent Le Gallic <legallic@crans.org>
Mon, 29 Feb 2016 02:04:41 +0000 (03:04 +0100)
committerVincent Le Gallic <legallic@crans.org>
Mon, 29 Feb 2016 02:04:41 +0000 (03:04 +0100)
bde/transactions.sh

index 088ec5cfc3af1654666430a56ade238425a9e0ef..21fb7e7c1dd8da0d3acbc938e6703017a796f135 100755 (executable)
@@ -5,7 +5,7 @@
 export LESS='-S'
 
 psql note -c "
-   SELECT t.id, t.date,
+   SELECT t.id, t.date, t.type,
           sum((CASE WHEN $1 = emetteur THEN (CASE WHEN $1 = destinataire THEN 0 ELSE -1 END) ELSE 1 END)*montant*quantite) OVER (ORDER BY date ASC) AS soldeapres,
           t.quantite, t.montant, t.description, t.valide, t.emetteur, t.destinataire,
           adhe.pseudo AS emetteur, adhd.pseudo AS destinataire