diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php index d4b5407c912..ba2643a04b8 100644 --- a/htdocs/accountancy/admin/accountmodel.php +++ b/htdocs/accountancy/admin/accountmodel.php @@ -888,18 +888,18 @@ if ($id) { if ($value == 'country') { - print '
| ' . $langs->trans("Total") . ' | '; -for($i = 1; $i <= 12; $i ++) { - print '' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . ' | '; +if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange. Why showing a report that should rely on result of this step ? +{ + print '
| ' . $langs->trans("Total") . ' | '; + for($i = 1; $i <= 12; $i ++) { + print '' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . ' | '; + } + print '' . $langs->trans("Total") . ' |
| ' . $row[0] . ' | '; + for($i = 1; $i <= 12; $i ++) { + print '' . price($row[$i]) . ' | '; + } + print '' . price($row[13]) . ' | '; + print '
| ' . $langs->trans("Total") . ' | '; -for($i = 1; $i <= 12; $i ++) { - print '' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . ' | '; +if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange. Why showing a report that should rely on result of this step ? +{ + print '
| ' . $langs->trans("Total") . ' | '; + for($i = 1; $i <= 12; $i ++) { + print '' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . ' | '; + } + print '' . $langs->trans("Total") . ' |
| ' . $row[0] . ' | '; + for($i = 1; $i <= 12; $i ++) { + print '' . price($row[$i]) . ' | '; + } + print '' . price($row[13]) . ' | '; + print '