Dolibarr / dolibarr

Dolibarr ERP CRM is a modern software package to manage your company or foundation's activity (contacts, suppliers, invoices, orders, stocks, agenda, accounting, ...). it's an open source Web application (written in PHP) designed for businesses of any sizes, foundations and freelancers.
https://www.dolibarr.org
GNU General Public License v3.0
5.48k stars 2.79k forks source link

From Member create user always external regardless of choice #26392

Open JonBendtsen opened 1 year ago

JonBendtsen commented 1 year ago

Bug

User creation from viewing a validated member always results in an external member regardless of the user type selection.

dolibarr_add_internal_user_from_member dolibarr_new_user_still_external

Our use case: Community member driven non profit organisation that arranges swing dance events and weekly classes.

We have thirdparty prospect and customers - These probably does not need a login. We have members of our non profit - some members might need a user login, especially the volunteers, teachers, ... We have thirdparty suppliers (international teachers) they might need a login.

All our members are also customers, even the volunteers, so if link a thirdparty to a user, the user type changes from internal to external and the access to Expense Reports are removed :-(

Environment Version

18.0.1

Environment OS

upshift dolibarr docker image 18.0.1

Environment Web server

upshift dolibarr docker image 18.0.1

Environment PHP

PHP 8.2.10 (cli) (built: Aug 31 2023 20:34:52) (NTS)

Environment Database

1:11.0.3+maria~ubu2204

Environment URL(s)

/dolibarr/adherents/card.php?id=25

Expected and actual behavior

Actual behaviour: Dolibarr overrules operator choice when it comes to user type, internal or external

Expected behaviour: Dolibarr would accept and uphold the operator choice of user type.

Steps to reproduce the behavior

From validated member, click create user, select internal type of user. After creation go to user details and see that user type is external :-(

Attached files

No response

daraelmin commented 10 months ago

Hi,

I've had the same issue. Following our General Assembly, two members were elected as committee members and became intern users.

However, I noticed that only one of the two cannot be transformed into an internal user: The one who has a linked third party (created automatically at the time of the first subscription paid online), while the other is not (contribution paid in the old way).

In short, it's a bug linked to the fact that a user with a third party number is necessarily an external user.

Workaround : you need to remove the number from the fk_soc column in the llx_user table for the affected user.

I'll try to make a PR as soon as I have time to fix this problem.

Cheers