diff --git a/htdocs/compta/bank/graph.php b/htdocs/compta/bank/graph.php index ca16e33a21c..4635b1318f7 100644 --- a/htdocs/compta/bank/graph.php +++ b/htdocs/compta/bank/graph.php @@ -1,8 +1,5 @@ - * Copyright (C) 2003 Jean-Louis Bergamo - * Copyright (C) 2004 Laurent Destailleur - * Copytight (C) 2004 Christophe Combelles +/* Copyright (C) 2005 Rodolphe Quiedeville * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -41,7 +38,10 @@ $account = $_GET["id"]; if ($account > 0) { - + $datetime = time(); + $month = strftime("%m", $datetime); + $year = strftime("%Y", $datetime); + $acct = new Account($db); $acct->fetch($account); @@ -51,7 +51,25 @@ if ($account > 0) print ''; - $file = "solde.$account.png"; + $file = "solde.$account.$year.$month.png"; + + print ''; + + print ''; + + if ($month == 1) + { + $monthprev = "12"; + $yearprev = $year - 1; + } + else + { + $monthprev = substr("00".($month - 1), -2) ; + $yearprev = $year ; + } + + + $file = "solde.$account.$yearprev.$monthprev.png"; print '';