diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 3500b2492fe..c715f53194a 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -683,7 +683,7 @@ class Conf if (!isset($this->global->MAIN_USE_OLD_TITLE_BUTTON)) $this->global->MAIN_USE_OLD_TITLE_BUTTON = 0; - if (!isset($conf->global->MAIN_JS_GRAPH)) $conf->global->MAIN_JS_GRAPH = 'chart'; // Use chart.js library + if (!isset($this->global->MAIN_JS_GRAPH)) $this->global->MAIN_JS_GRAPH = 'chart'; // Use chart.js library if (empty($this->global->MAIN_MODULE_DOLISTORE_API_SRV)) $this->global->MAIN_MODULE_DOLISTORE_API_SRV = 'https://www.dolistore.com'; if (empty($this->global->MAIN_MODULE_DOLISTORE_API_KEY)) $this->global->MAIN_MODULE_DOLISTORE_API_KEY = 'dolistorecatalogpublickey1234567'; diff --git a/htdocs/core/customreports.php b/htdocs/core/customreports.php index 7c3e0233c66..4d18429010b 100644 --- a/htdocs/core/customreports.php +++ b/htdocs/core/customreports.php @@ -230,7 +230,9 @@ if (is_array($search_groupby) && count($search_groupby)) { } while ($obj = $db->fetch_object($resql)) { - $valuetranslated = $obj->val; + if (is_null($obj->val)) $valuetranslated = $langs->transnoentitiesnoconv("NotDefined"); + else if ($obj->val === '') $valuetranslated = $langs->transnoentitiesnoconv("Empty"); + else $valuetranslated = $obj->val; if (!empty($object->fields[$gvalwithoutprefix]['arrayofkeyval'])) { $valuetranslated = $object->fields[$gvalwithoutprefix]['arrayofkeyval'][$obj->val]; } @@ -321,7 +323,7 @@ if ($object->isextrafieldmanaged) { } } } -print '
'.$langs->trans("Measures").'
'; +print '
'.$langs->trans("Measures").'
'; print $form->multiselectarray('search_measures', $arrayofmesures, $search_measures, 0, 0, 'minwidth500', 1); print ''; @@ -399,7 +401,7 @@ $arrayofxaxislabel = array(); foreach ($arrayofxaxis as $key => $val) { $arrayofxaxislabel[$key] = $val['label']; } -print '
'.$langs->trans("XAxis").'
'; +print '
'.$langs->trans("XAxis").'
'; print $form->multiselectarray('search_xaxis', $arrayofxaxislabel, $search_xaxis, 0, 0, 'minwidth250', 1); print ''; @@ -665,7 +667,6 @@ if ($sql) { $totalnbofrecord = count($data); } -//var_dump($data); print '
';