Fix when first label is '0'

This commit is contained in:
Laurent Destailleur 2024-02-25 23:58:37 +01:00
parent 8322a4e850
commit 7d4334a353

View file

@ -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);