dolibarr icon indicating copy to clipboard operation
dolibarr copied to clipboard

Fix show desact projects in os card using small penci

Open vmaury opened this issue 2 years ago • 1 comments

#FIX 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

vmaury avatar Feb 06 '24 10:02 vmaury

Disabled project are included in edit because if the order has a closed project, when we edit, the combo list must remain on the project of the order. So in create mode we should exclude open project but, when editing, the closed project must also be included into combo list so the current project of the order does not disappear

eldy avatar Feb 07 '24 17:02 eldy

If you watch the code of the project select, even if closed project are hidden ($discard_closed = 1), the current project - even if it's closed - is displayed

Cf line ~225 of dolibarr/htdocs/core/class/html.formprojet.class.php, function FormProjets.select_projects_list

if ($discard_closed == 1 && $obj->fk_statut == 2 && $obj->rowid != $selected) { // We discard closed except if selected

vmaury avatar Feb 20 '24 10:02 vmaury

If you watch the code of the project select, even if closed project are hidden ($discard_closed = 1), the current project - even if it's closed - is displayed

Cf line ~225 of dolibarr/htdocs/core/class/html.formprojet.class.php, function FormProjets.select_projects_list

if ($discard_closed == 1 && $obj->fk_statut == 2 && $obj->rowid != $selected) { // We discard closed except if selected

Good catch 👍🏻

eldy avatar Feb 23 '24 16:02 eldy