diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index f4e551c6452..6969066629c 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -926,12 +926,12 @@ class FormCompany extends Form $out .= ''; } elseif ($typeinput == 'list') { $out .= ''; - if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) { - $out .= ''; - } if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) { $out .= ''; } + if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) { + $out .= ''; + } $out .= ''; $out .= ''; } elseif ($typeinput == 'admin') { diff --git a/htdocs/societe/class/client.class.php b/htdocs/societe/class/client.class.php index 3b289547f8d..be1d18836bc 100644 --- a/htdocs/societe/class/client.class.php +++ b/htdocs/societe/class/client.class.php @@ -58,7 +58,7 @@ class Client extends Societe // phpcs:enable global $user; - $this->nb = array("customers" => 0, "prospects" => 0); + $this->nb = array("prospects" => 0, "customers" => 0); $clause = "WHERE"; $sql = "SELECT count(s.rowid) as nb, s.client"; diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index b34f74e1499..a76a287c739 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -1209,14 +1209,14 @@ while ($i < min($num, $limit)) { print ''; $s = ''; + if (($obj->client == 2 || $obj->client == 3) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) + { + $s .= ''.dol_substr($langs->trans("Prospect"), 0, 1).''; + } if (($obj->client == 1 || $obj->client == 3) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) { $s .= ''.dol_substr($langs->trans("Customer"), 0, 1).''; } - if (($obj->client == 2 || $obj->client == 3) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) - { - $s .= ''.dol_substr($langs->trans("Prospect"), 0, 1).''; - } if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && $obj->fournisseur) { $s .= ''.dol_substr($langs->trans("Supplier"), 0, 1).'';