From 7d4334a353223b5ee1f7e9ca226fa7fc552a69f4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 25 Feb 2024 23:58:37 +0100 Subject: [PATCH] Fix when first label is '0' --- htdocs/core/customreports.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/customreports.php b/htdocs/core/customreports.php index 816652f01ff..f503e647dff 100644 --- a/htdocs/core/customreports.php +++ b/htdocs/core/customreports.php @@ -940,7 +940,7 @@ if ($sql) { } $labeltouse = (($xlabel || $xlabel == '0') ? dol_trunc($xlabel, 20, 'middle') : ($xlabel === '' ? $langs->transnoentitiesnoconv("Empty") : $langs->transnoentitiesnoconv("NotDefined"))); - if ($oldlabeltouse && ($labeltouse != $oldlabeltouse)) { + if ($oldlabeltouse !== '' && ($labeltouse != $oldlabeltouse)) { $xi++; // Increase $xi } //var_dump($labeltouse.' '.$oldlabeltouse.' '.$xi);