Fix show desactproj in os card (#28039)

When creating or modifying order supplier with complete form, only active projects (if activated) are displayed in select (ajax or not)

But when using the small pencil, desactivated project are displayed
This commit is contained in:
Vincent Maury 2024-02-23 17:47:55 +01:00 committed by GitHub
parent f3a3de8ea2
commit 23d912decd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2086,7 +2086,7 @@ if ($action == 'create') {
if ($action != 'classify' && $caneditproject) {
$morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> ';
}
$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, (!getDolGlobalString('PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS') ? $object->socid : -1), $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300');
$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, (!getDolGlobalString('PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS') ? $object->socid : -1), $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 1, 0, 0, 1, '', 'maxwidth300');
} else {
if (!empty($object->fk_project)) {
$proj = new Project($db);