diff --git a/htdocs/compta/paiement/rapport.php b/htdocs/compta/paiement/rapport.php index 5e71cd6f0ff..9ba095e97e4 100644 --- a/htdocs/compta/paiement/rapport.php +++ b/htdocs/compta/paiement/rapport.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004 Laurent Destailleur + * Copyright (C) 2004-2006 Laurent Destailleur * * 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 @@ -18,7 +18,6 @@ * * $Id$ * $Source$ - * */ /** \file htdocs/compta/paiement/rapport.php @@ -36,11 +35,14 @@ $user->getrights("facture"); if (! $user->rights->facture->lire) accessforbidden(); +$dir = $conf->compta->dir_output; + $socidp=0; if ($user->societe_id > 0) { $action = ''; $socidp = $user->societe_id; + $dir = DOL_DATA_ROOT.'/private/'.$user->id.'/compta'; } @@ -50,7 +52,6 @@ if (! $year) { $year=date("Y"); } require("../../includes/modules/rapport/pdf_paiement.class.php"); -$dir = $conf->compta->dir_output; /* @@ -64,9 +65,10 @@ if ($_POST["action"] == 'gen') $year = $_POST["reyear"]; } -llxHeader(); +llxHeader(); + /* * Affichage liste des paiements * @@ -80,30 +82,18 @@ print ''; $cmonth = date("n", time()); $syear = date("Y", time()); -$strmonth[1] = "Janvier"; -$strmonth[2] = "Février"; -$strmonth[3] = "Mars"; -$strmonth[4] = "Avril"; -$strmonth[5] = "Mai"; -$strmonth[6] = "Juin"; -$strmonth[7] = "Juillet"; -$strmonth[8] = "Août"; -$strmonth[9] = "Septembre"; -$strmonth[10] = "Octobre"; -$strmonth[11] = "Novembre"; -$strmonth[12] = "Décembre"; -print ''; for ($month = 1 ; $month < 13 ; $month++) { - if ($month == $cmonth) - { - print "