diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php index 58bd40ad26d..a58328696c0 100644 --- a/htdocs/compta/stats/casoc.php +++ b/htdocs/compta/stats/casoc.php @@ -1,6 +1,8 @@ * Copyright (C) 2004-2005 Laurent Destailleur + * Copyright (C) 2006 Laurent Destailleur + * Copyright (C) 2007 Franky Van Liedekerke * * 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 @@ -102,7 +104,7 @@ if ($result) while ($i < $num) { $obj = $db->fetch_object($result); - $amount[$obj->rowid] = $obj->amount_ttc; + $amount[$obj->rowid] += $obj->amount_ttc; $name[$obj->rowid] = $obj->name; $catotal+=$obj->amount_ttc; $i++; @@ -131,7 +133,7 @@ if ($modecompta != 'CREANCES-DETTES') while ($i < $num) { $obj = $db->fetch_object($result); - $amount[$obj->rowid] = $obj->amount_ttc; + $amount[$obj->rowid] += $obj->amount_ttc; $name[$obj->rowid] = $obj->name; $catotal+=$obj->amount_ttc; $i++;