diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 97c26954bf7..7d74276ce90 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3902,7 +3902,7 @@ class Form $sql = 'SELECT rowid, label, code from '.MAIN_DB_PREFIX.'c_units'; $sql .= ' WHERE active > 0'; - if(!empty($unit_type)){ + if (!empty($unit_type)){ $sql .= ' AND unit_type = "'.$this->db->escape($unit_type).'" '; } diff --git a/htdocs/core/tpl/objectline_edit.tpl.php b/htdocs/core/tpl/objectline_edit.tpl.php index 4546cb7d089..a59ab4b881a 100644 --- a/htdocs/core/tpl/objectline_edit.tpl.php +++ b/htdocs/core/tpl/objectline_edit.tpl.php @@ -194,10 +194,10 @@ $coldisplay++; $unit_type = false; // limit unit select to unit type if(!empty($line->fk_unit) && empty($conf->global->MAIN_EDIT_LINE_ALLOW_ALL_UNIT_TYPE)){ - if(!class_exists('CUnits')) include_once DOL_DOCUMENT_ROOT . '/core/class/cunits.class.php'; + if (!class_exists('CUnits')) include_once DOL_DOCUMENT_ROOT . '/core/class/cunits.class.php'; $cUnit = new CUnits($line->db); - if($cUnit->fetch($line->fk_unit) > 0){ - if(!empty($cUnit->unit_type)){ + if ($cUnit->fetch($line->fk_unit) > 0){ + if (!empty($cUnit->unit_type)){ $unit_type = $cUnit->unit_type; } }