From 832284e7107dac97c44af2757bf640b7935553d8 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 19 Feb 2024 15:20:08 +0100 Subject: [PATCH 1/2] FIX avoid error "Column 'entity' in where clause is ambiguous" (#28270) --- htdocs/core/lib/company.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index fd231091af1a1..82e42792144a8 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -71,7 +71,7 @@ function societe_prepare_head(Societe $object) $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; $sql .= " WHERE p.fk_soc = ".((int) $object->id); - $sql .= " AND entity IN (".getEntity($object->element).")"; + $sql .= " AND p.entity IN (".getEntity($object->element).")"; // Add where from hooks $parameters = array('contacttab' => true); $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object); // Note that $action and $object may have been modified by hook From ab5d5a3e79a7629cb3ab666bf3ee9172a8308e5d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 19 Feb 2024 18:18:28 +0100 Subject: [PATCH 2/2] FIX #28205 --- htdocs/reception/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php index dfe2c51df4f67..ef382cdf5f7be 100644 --- a/htdocs/reception/card.php +++ b/htdocs/reception/card.php @@ -2094,9 +2094,9 @@ $line->fetch_optionals(); if ($action == 'editline' && $lines[$i]->id == $line_id) { - print $line->showOptionals($extrafields, 'edit', array('colspan'=>$colspan), $indiceAsked); + print $line->showOptionals($extrafields, 'edit', array('colspan'=>$colspan), ''); } else { - print $line->showOptionals($extrafields, 'view', array('colspan'=>$colspan), $indiceAsked); + print $line->showOptionals($extrafields, 'view', array('colspan'=>$colspan), ''); } } }