diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index b925f4d7b2b..a334bd3aad1 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -10,11 +10,11 @@ * Copyright (C) 2014 Ion Agorria * Copyright (C) 2018-2026 Frédéric France * Copyright (C) 2022 Gauthier VERDOL - * Copyright (C) 2022-2024 Charlene Benke + * Copyright (C) 2022-2026 Charlene Benke * Copyright (C) 2023 Joachim Kueter - * Copyright (C) 2024-2025 MDW + * Copyright (C) 2024-2025 MDW * Copyright (C) 2024 Nick Fragoulis - * Copyright (C) 2025 Alexandre Spangaro + * Copyright (C) 2025 Alexandre Spangaro * * 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 @@ -2067,9 +2067,10 @@ if ($action == 'create') { $langs->load('projects'); print ''.$langs->trans('Project').''; + if ($socid > 0) { // external user $projSocFilter = $socid; - } elseif ((int) $societe->id == 0 || getDolGlobalString('PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS')) { + } elseif ((int) $socid == 0 || getDolGlobalString('PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS')) { $projSocFilter = -1; } else { $projSocFilter = $societe->id;