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

Services lists only products #28635

Closed
mwelters opened this issue Mar 4, 2024 · 8 comments
Closed

Services lists only products #28635

mwelters opened this issue Mar 4, 2024 · 8 comments
Labels
Bug This is a bug (something does not work as expected)

Comments

@mwelters
Copy link
Contributor

mwelters commented Mar 4, 2024

Bug

in Services the type defaults to "products"
Selecting Services in Offers and Invoices is impossible. Search for ARticle to add with the p.ref shows no result from services

Dolibarr Version

20.0.0-alpha develop from today

Environment PHP

8.1.27

Environment Database

10.5.23-MariaDB-0+deb11u1

Steps to reproduce the behavior and expected behavior

Click on Products/Services

Attached files

No response

@mwelters mwelters added the Bug This is a bug (something does not work as expected) label Mar 4, 2024
@JonBendtsen
Copy link
Contributor

pictures might have been nice

@hregis
Copy link
Contributor

hregis commented Mar 4, 2024

@mwelters @eldy the problem is in line 140 of list.php !

$search_type == '0' before this test, and never $search_type == ''

if ((string) $type == '1') {
	$contextpage = 'servicelist';
	if ($search_type == '') {
		$search_type = '1';
	}
}

@hregis
Copy link
Contributor

hregis commented Mar 4, 2024

try with this fix #28643

@hregis
Copy link
Contributor

hregis commented Mar 4, 2024

@eldy why GETPOST("search_type", "int") is not the same result of GETPOSTINT("search_type") ??

@mwelters
Copy link
Contributor Author

mwelters commented Mar 4, 2024

try with this fix #28643

yes, helps in this particular case.
But I think better fix the behavior of GETPOSTINT cause it is causing problems also in Propal and Invoices (as far as I discovered)

@mwelters
Copy link
Contributor Author

mwelters commented Mar 6, 2024

Problem is solved with one of the last commits to develop

@eldy why GETPOST("search_type", "int") is not the same result of GETPOSTINT("search_type") ??

@mwelters
Copy link
Contributor Author

mwelters commented Apr 4, 2024

Checked out develop today 4. April 2024 and the problem is still there.

In an Invoice, you cannot insert a Service, only a product. Listing Services and Products is fine.
image

The Invoice draft was created with an earlier pull, just to demonstrate the existing Service "ABB" is not selectable for an Invoice

@mwelters mwelters reopened this Apr 19, 2024
@mwelters
Copy link
Contributor Author

The problem appeared again a few commits ago...
Tested with commit c5751a9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug (something does not work as expected)
Projects
None yet
Development

No branches or pull requests

3 participants