diff --git a/htdocs/core/boxes/box_graph_propales_permonth.php b/htdocs/core/boxes/box_graph_propales_permonth.php index 7179f255add..78cbadc6fb2 100644 --- a/htdocs/core/boxes/box_graph_propales_permonth.php +++ b/htdocs/core/boxes/box_graph_propales_permonth.php @@ -195,7 +195,7 @@ class box_graph_propales_permonth extends ModeleBoxes { if ($startmonth != 0) { - $legend[]=sprintf("%d/%d",$i-2001, $i-2000); + $legend[]=sprintf("%d/%d", $i-2001, $i-2000); } else { diff --git a/htdocs/core/class/stats.class.php b/htdocs/core/class/stats.class.php index a15800f8ce6..85a6f43ed4d 100644 --- a/htdocs/core/class/stats.class.php +++ b/htdocs/core/class/stats.class.php @@ -106,7 +106,7 @@ abstract class Stats $year=$startyear; while($year <= $endyear) { - $data[$i][]=$datay[$year - (1 - (int) (($i+$startmonth)/12)) + ($startmonth == 0 ? 1 : 0)][($i+$startmonth)%12][1]; + $data[$i][]=$datay[$year - (1 - ((int) ($i+$startmonth)/12) + ($startmonth == 0 ? 1 : 0))][($i+$startmonth)%12][1]; $year++; } } @@ -206,7 +206,7 @@ abstract class Stats $year=$startyear; while($year <= $endyear) { - $data[$i][]=$datay[$year - (1 - (int) (($i+$startmonth)/12)) + ($startmonth == 0 ? 1 : 0)][($i+$startmonth)%12][1]; // set yval for x=i + $data[$i][]=$datay[$year - (1 - ((int) ($i+$startmonth)/12) + ($startmonth == 0 ? 1 : 0))][($i+$startmonth)%12][1]; // set yval for x=i $year++; } }