Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NEW : hide external user in combobox #25740

Merged

Conversation

atm-thibaultf
Copy link
Contributor

NEW|New hide external user in combobox

Adding configuration to hide external user in combobox and select

Comment on lines +519 to +521
if (!empty($conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX)) {
$sql_usr .= " AND u.statut <> 0";
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding this in the same time because it was missing

@atm-maxime
Copy link
Member

In Dolibarr, an external user is attached to a third-party (fk_soc > 0). So there will be a confusion between external and non employee users

@@ -171,6 +171,9 @@ public function multiselectselectSalesRepresentatives($htmlname, $selected_array
if (!empty($conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX)) {
$sql_usr .= " AND u2.statut<>0 ";
}
if (!empty($conf->global->USER_HIDE_EXTERNAL_IN_COMBOBOX)) {
$sql_usr .= " AND u2.employee<>0 ";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be you mean USER_HIDE_NONEMPLOYEE_IN_COMBOBOX ? (external term is used for external users so fk_soc > 0).
If you really mean hide external user, condition should be AND u2.fk_soc IS NULL

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed ! In the end, I have added the two options for non employee and external user if it's fine for you @eldy

@eldy eldy added the Discussion Some questions or discussions are opened and wait answers of author or other people to be processed label Aug 31, 2023
@atm-thibaultf
Copy link
Contributor Author

@eldy

@eldy eldy merged commit 1d00d90 into Dolibarr:develop Jan 15, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Some questions or discussions are opened and wait answers of author or other people to be processed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants