Do not write the rows in calendar cat. report if all columns are zero

This commit is contained in:
Hadi Nategh 2017-01-10 09:26:57 +01:00
parent 1eff570926
commit 7329088e14

View File

@ -397,6 +397,14 @@ class calendar_category_report extends calendar_ui{
foreach ($raw_csv as &$row)
{
$check_row = 0;
foreach ($row as $val)
{
$check_row += $val;
}
//check if all values of the row is zero then escape the row
if (!$check_row) continue;
// printout each row into file
fputcsv($fp, array_values($row));
}