Remove comments about project linking in card-rec.php

Removed comments regarding project linking behavior in the supplier invoice rec card.
This commit is contained in:
Alexandre SPANGARO 2026-06-03 06:39:39 +02:00 committed by GitHub
parent 04f3813421
commit c6907dca87
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1005,9 +1005,6 @@ if ($action == 'create') {
$projectid = GETPOST('projectid') ? GETPOST('projectid') : $object->fk_project;
$langs->load('projects');
print '<tr><td>' . $langs->trans('Project') . '</td><td>';
// Mirror the regular supplier invoice card.php: honour PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS
// (so projects unrelated to this supplier can be picked when the constant is set) and exclude
// closed projects from the dropdown (see issue #31135).
$numprojet = $formproject->select_projects((!getDolGlobalString('PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS') ? $object->thirdparty->id : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 0, 0, '');
print ' &nbsp; <a href="' . DOL_URL_ROOT . '/projet/card.php?socid=' . $object->thirdparty->id . '&action=create&status=1&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?action=create&socid=' . $object->thirdparty->id . (!empty($id) ? '&id=' . $id : '')) . '">' . $langs->trans("AddProject") . '</a>';
print '</td></tr>';
@ -1199,9 +1196,6 @@ if ($action == 'create') {
$morehtmlref .= '<form method="post" action="' . $_SERVER['PHP_SELF'] . '?id=' . $object->id . '">';
$morehtmlref .= '<input type="hidden" name="action" value="classin">';
$morehtmlref .= '<input type="hidden" name="token" value="' . newToken() . '">';
// Mirror the regular supplier invoice card.php: honour PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS
// and exclude closed projects so the picker behaves like the one in the non-recurring
// supplier invoice form (see issue #31135).
$morehtmlref .= $formproject->select_projects((!getDolGlobalString('PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS') ? $object->socid : -1), $object->fk_project, 'projectid', $maxlength, 0, 1, 1, 1, 0, 0, '', 1);
$morehtmlref .= '<input type="submit" class="button valignmiddle" value="' . $langs->trans("Modify") . '">';
$morehtmlref .= '</form>';