From f455d43f9a00f280ea3e8766fc79700c450bc1df Mon Sep 17 00:00:00 2001 From: Vincent Le Gallic Date: Wed, 10 Feb 2016 14:03:31 +0100 Subject: [PATCH] =?utf8?q?[bde/credits=5Fduplicates]=20On=20affiche=20le?= =?utf8?q?=20montant=20total=20gagn=C3=A9=20si=20d=C3=A9validation?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- bde/credits_duplicates.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bde/credits_duplicates.py b/bde/credits_duplicates.py index 18b177f..a96815e 100755 --- a/bde/credits_duplicates.py +++ b/bde/credits_duplicates.py @@ -124,6 +124,7 @@ def interactive(blocks, cur, args): ou d'afficher une liste de toutes celles à dévalider. """ ids_to_devalidate = [] + total = 0 for b in blocks: lb = [int(i) for i in b.split(",")] l = get_transactions(cur, b) @@ -145,9 +146,11 @@ def interactive(blocks, cur, args): elif ans.lower() in ["s"]: lb.remove(idkeep) ids_to_devalidate.extend(lb) + total += l[0]["montant"] * (len(l) - 1) if ids_to_devalidate: print "\nIDs de transactions à dévalider (%s) :" % len(ids_to_devalidate) print ",".join([str(i) for i in ids_to_devalidate]) + print "Montant total : %s" % (total,) if __name__ == "__main__": parser = argparse.ArgumentParser(description="Liste les crédits semblables trop proches dans le temps et propose de les dévalider tous sauf 1.") -- 2.39.2