From 420fdcacedce51bb7376c9931ca9a781ca25fcc9 Mon Sep 17 00:00:00 2001 From: Marc de Lima Lucio <68746600+marc-dll@users.noreply.github.com> Date: Tue, 21 Mar 2023 15:08:28 +0100 Subject: [PATCH] FIX: societe list: regression to redirection to customer card when single result of search filters --- htdocs/societe/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index de58e557d8e..4c5f0251485 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -776,7 +776,7 @@ if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && ( $obj = $db->fetch_object($resql); $id = $obj->rowid; if (!empty($conf->global->SOCIETE_ON_SEARCH_AND_LIST_GO_ON_CUSTOMER_OR_SUPPLIER_CARD)) { - if ($companystatic->client > 0) { + if ($obj->client > 0) { header("Location: ".DOL_URL_ROOT.'/comm/card.php?socid='.$id); exit; }