diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index a1a3b9306bb..bc371942fb3 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1,4 +1,5 @@ * Copyright (C) 2004-2021 Laurent Destailleur * Copyright (C) 2004 Eric Seigne @@ -20,7 +21,7 @@ * Copyright (C) 2022 ButterflyOfFire * Copyright (C) 2023-2024 Alexandre Janniaux * Copyright (C) 2024 William Mead - * Copyright (C) 2024 MDW + * Copyright (C) 2024-2025 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 @@ -45,6 +46,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/commonincoterm.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/commonsocialnetworks.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/commonpeople.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php'; @@ -3192,7 +3194,7 @@ class Societe extends CommonObject if (empty($option) || preg_match('/customer/', $option)) { if (($this->client == 1 || $this->client == 3) && !getDolGlobalString('SOCIETE_DISABLE_CUSTOMERS')) { $s .= '<'.$tag.' class="customer-back" title="'.dolPrintHTMLForAttribute($langs->trans("Customer")).'"'; - $s.= $tag == 'a' ? ' href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$this->id.'"' : ''; + $s .= $tag == 'a' ? ' href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$this->id.'"' : ''; $s .= '>'.dol_substr($langs->trans("Customer"), 0, 1).''; } } diff --git a/test/phpunit/SocieteTest.php b/test/phpunit/SocieteTest.php index 79f40128c59..65ac7f70d96 100644 --- a/test/phpunit/SocieteTest.php +++ b/test/phpunit/SocieteTest.php @@ -1,7 +1,9 @@ * Copyright (C) 2023 Alexandre Janniaux * Copyright (C) 2024 Frédéric France + * Copyright (C) 2025 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 @@ -100,7 +102,6 @@ class SocieteTest extends CommonClassTest $localobject->country_code = 'ES'; $result = $localobject->create($user); - var_dump($localobject);exit; print __METHOD__." result=".$result."\n"; $this->assertLessThanOrEqual($result, 0);