X-Git-Url: http://gitweb.pimeys.fr/?a=blobdiff_plain;f=bde%2Ftransactions.sh;h=21fb7e7c1dd8da0d3acbc938e6703017a796f135;hb=dea55eaad449d0dbfdd7a14b4d1000182a7032c9;hp=088ec5cfc3af1654666430a56ade238425a9e0ef;hpb=cc37917897820f8406a181d0d0980e75e95317fd;p=scripts-20-100.git diff --git a/bde/transactions.sh b/bde/transactions.sh index 088ec5c..21fb7e7 100755 --- a/bde/transactions.sh +++ b/bde/transactions.sh @@ -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