diff --git a/htdocs/societe/ajax/ajaxcompanies.php b/htdocs/societe/ajax/ajaxcompanies.php index f7bb0ce0c60..11de653e6c5 100644 --- a/htdocs/societe/ajax/ajaxcompanies.php +++ b/htdocs/societe/ajax/ajaxcompanies.php @@ -3,6 +3,7 @@ * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2007-2010 Laurent Destailleur * Copyright (C) 2010 Cyrille de Lambert + * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -43,7 +44,10 @@ if (!defined('NOREQUIRESOC')) { require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; -$id = GETPOSTINT('socid') || GETPOSTINT('id_fourn'); +$id = GETPOSTINT('socid'); +if ($id == 0) { + $id = GETPOSTINT('id_fourn'); +} $object = new Societe($db); if ($id > 0) {