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

FIX units used scale and scale is an integer #32496

Merged
merged 1 commit into from
Jan 2, 2025

Conversation

hregis
Copy link
Contributor

@hregis hregis commented Dec 31, 2024

No description provided.

@erikvanberkum
Copy link
Contributor

@hregis this is not fixing it for me. The fix needs to be applied to: public function update($id, $user, $notrigger = 0, $action = 'update', $updatetype = false) your fix is applied to the public function fetch($id = 0, $ref = '', $ref_ext = '', $barcode = '', $ignore_expression = 0, $ignore_price_load = 0, $ignore_lang_load = 0)

Can you check

@hregis
Copy link
Contributor Author

hregis commented Jan 2, 2025

@erikvanberkum @eldy This first fix allows not to lose the value selected in the "selectMeasuringUnits()" function when the value is empty ("scale" field of the measurement units dictionary)
A deep correction would be needed because the processing of these measurement units were treated as strings while they are integers.

@eldy eldy merged commit 4b6b4eb into Dolibarr:20.0 Jan 2, 2025
6 checks passed
erikvanberkum added a commit to erikvanberkum/dolibarr that referenced this pull request Jan 5, 2025
solves issue Dolibarr#32495: current Empty testing for 0 results in TRUE and makes it an empty string. Testing for is_null solves the issue. 

this issue is connected with pull FIX Dolibarr#32496
@erikvanberkum erikvanberkum mentioned this pull request Jan 5, 2025
eldy pushed a commit that referenced this pull request Jan 5, 2025
solves issue #32495: current Empty testing for 0 results in TRUE and
makes it an empty string. Testing for is_null solves the issue.

this issue is connected with pull FIX #32496
@hregis hregis deleted the fix_20_avoid_lost_units branch January 6, 2025 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants