diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 0194fdf7b72..61181101c5a 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -785,7 +785,6 @@ if (!empty($conf->margin->enabled)) { $formmargin = new FormMargin($db); } $companystatic = new Societe($db); -$companyparent = new Societe($db); $company_url_list = array(); $formcompany = new FormCompany($db); $projectstatic = new Project($db); @@ -2036,6 +2035,7 @@ if ($resql) { print ''; if ($obj->fk_parent > 0) { if (!isset($company_url_list[$obj->fk_parent])) { + $companyparent = new Societe($db); $res = $companyparent->fetch($obj->fk_parent); if ($res > 0) { $company_url_list[$obj->fk_parent] = $companyparent->getNomUrl(1);