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

Computed extrafields doesn't work on list DOL V20.0.1 PHP 8.0.26 #31333

Open
Gilles-L-Artaban opened this issue Oct 9, 2024 · 1 comment
Open
Labels
Bug This is a bug (something does not work as expected)

Comments

@Gilles-L-Artaban
Copy link
Contributor

Bug

(($reloadedobj = new Propal($db)) && ($reloadedobj->fetchNoCompute($objectoffield->id) > 0)) ? ($reloadedobj->total_ttc) - ($reloadedobj->array_options["options_remisettc_1"]) - ($reloadedobj->array_options["options_remisettc_2"]) - ($reloadedobj->array_options["options_remisettc_3"]) - ($reloadedobj->array_options["options_remisettc_4"]) - ($reloadedobj->array_options["options_remisettc_5"]) : "-1"

works on card but display -1 on the list

My guess, I have to find an another way to get the object id. Or this is a bug ?

GL

Dolibarr Version

20.0.1

Environment PHP

8.0.26

Environment Database

No response

Steps to reproduce the behavior and expected behavior

No response

Attached files

No response

@Gilles-L-Artaban Gilles-L-Artaban added the Bug This is a bug (something does not work as expected) label Oct 9, 2024
@Gilles-L-Artaban Gilles-L-Artaban changed the title Calculated extrafields doesn't work on list Computed extrafields doesn't work on list DOL V20.0.1 PHP 8.0.26 Oct 10, 2024
@Gilles-L-Artaban
Copy link
Contributor Author

(($reloadedobj = new Propal($db)) && ($reloadedobj->fetchNoCompute(is_null($obj) ? $objectoffield->id : $obj->rowid) > 0)) ? ($reloadedobj->total_ttc) - ($reloadedobj->array_options["options_remisettc_1"]) - ($reloadedobj->array_options["options_remisettc_2"]) - ($reloadedobj->array_options["options_remisettc_3"]) - ($reloadedobj->array_options["options_remisettc_4"]) - ($reloadedobj->array_options["options_remisettc_5"]) : "-1"

works on card and on list.

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

1 participant