Commit graph

151979 commits

Author SHA1 Message Date
Regis Houssin
aa4d9cc8a6
FIX missing PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES checking (#38442) 2026-05-26 16:00:28 +02:00
HUPI
5675986268
Fix #38407: API addtimespent crashes with "Illegal offset type" on PHP 8+ (#38408)
* Fix: API addtimespent crashes with "Illegal offset type" on PHP 8+

Fixes #38407

The @param annotations for $date (datetime|string) and $progress (int|null)
in Tasks::addTimeSpent() use union types, which Restler's Validator parses
into a PHP array. Then Validator::validate() at line 427 evaluates
isset(static::$preFilters[$info->type]) using that array as an array key,
which throws "Illegal offset type in isset or empty" on PHP 8+. Every call
to POST /tasks/{id}/addtimespent therefore returns HTTP 500 before the
endpoint code runs.

Use single-type annotations matching the convention already used by
Tasks::putTimeSpent in the same file: @param datetime + @phan-param string
for the date, and plain @param int for progress (its -1 default already
encodes "leave unchanged", so int|null is not needed).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Vincent Moreno <vincent.moreno@hupi.fr>

* Update parameter type for date in API documentation

* Update api_tasks.class.php

---------

Signed-off-by: Vincent Moreno <vincent.moreno@hupi.fr>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-05-26 06:52:14 +02:00
William Mead
0d8dc4529b
FIX intervention API line updating (#38414)
* Fixed intervention api line updating

* Fixed type
2026-05-25 02:44:25 +02:00
Laurent Destailleur
f32a4884e8 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into 23.0 2026-05-25 01:07:38 +02:00
Laurent Destailleur
bd97fbd653 Fix debian package 2026-05-25 01:01:08 +02:00
Laurent Destailleur
e67c919850 Prepare 22.0.5 2026-05-24 21:30:14 +02:00
Laurent Destailleur
0e87c73107 Fix type 2026-05-23 01:46:54 +02:00
Laurent Destailleur
32a6a95c34 Merge branch '23.0' of git@github.com:Dolibarr/dolibarr.git into 23.0 2026-05-23 01:33:56 +02:00
Laurent Destailleur
a2eadd7ed0 FIX out of dynamically recalculated unit price inc tax was missing
relative discount.
2026-05-23 01:33:38 +02:00
daraelmin
4aff1a7741
FIX: GDPR cron job false positive errors and birth date format (#38218)
- Fixed false positive error logging in `_recordActionResult`: an `update()` returning 0 (no rows affected) is no longer treated as an error (changed `<= 0` to `< 0`).
- Fixed `birth` date data type for Adherent anonymization: replaced the static string '1900-01-01' with a UNIX timestamp using `dol_mktime()` to comply with Dolibarr Core standards and prevent silent DAL failures.
2026-05-22 21:46:09 +02:00
Sacha Pignot
e2c52e8d02
FIX #37867 Rename MAIN_MODULE_OPENIDCONNECT to MAIN_AUTHENTICATION_OIDC_ON in migration (#38326)
OIDC was converted from a module to a config-level feature in v23 (#36051),
renaming the enable constant. No migration was added to update existing
llx_const rows, causing OIDC to appear disabled after a v22 -> v23 upgrade.
2026-05-22 13:52:14 +02:00
Pierre Grasswill
139ecd4a7c
FIX: Allow editing quantity to produce on MO while in draft status (#38176)
Add an inline edit pencil next to 'QtyToProduce' on the MO card and the
MO production view when the order is still in DRAFT status. On save:

1. The MO qty is updated through Mo::update(), which internally calls
   Mo::updateProduction() to scale 'toconsume'/'toproduce' lines
   proportionally (newQty/oldQty), respecting qty_frozen flags.

2. The 'toproduce' line for the MO's main product is then explicitly
   realigned to match the MO qty exactly. This guards against legacy
   inconsistent states and floating-point drift from successive ratio
   scaling, while leaving BOM sub-product ratios and frozen lines
   untouched.

The handler is placed BEFORE the include of
actions_addupdatedelete.inc.php, because that file has a generic
'set<key>' matcher that would otherwise intercept 'setqty', call
$object->fetch() + update() without setting $object->oldQty, and
silently skip the line scaling.

The edit is gated both client-side (pencil only shown when DRAFT) and
server-side (setqty handler checks STATUS_DRAFT) to prevent any
modification once the MO has been validated.

Note: the field type 'real' is temporarily overridden to 'numeric' only
while the edit pencil is active (action=editqty), because
Form::editfieldval() in html.form.class.php does not handle 'real' and
would render the Save/Cancel buttons with no <input> field in between.
Read-mode rendering (via price()) is preserved.
2026-05-22 13:31:23 +02:00
Frédéric FRANCE
0d068d3cb6
fix test (#38392)
* fix test

* Update config.inc.php

* Update config.inc.php

* Update config.inc.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-05-22 13:15:31 +02:00
John BOTELLA
4f2b717513
Fix php 8 warning (#38343)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-05-22 11:38:56 +02:00
Laurent Destailleur
228da2b7b7 ci 2026-05-22 11:35:09 +02:00
Laurent Destailleur
b1e13647b2 Fix css 2026-05-22 11:30:30 +02:00
Laurent Destailleur
8f04bb91e3 css 2026-05-22 11:27:13 +02:00
John BOTELLA
928b206514
Fix hard reading on bad screen (#38344) 2026-05-22 11:24:48 +02:00
Laurent Destailleur
395e3d7861 Merge branch '23.0' of git@github.com:Dolibarr/dolibarr.git into 23.0 2026-05-22 11:11:38 +02:00
Laurent Destailleur
2d050a58a6 ci 2026-05-22 11:11:22 +02:00
Laurent Destailleur
1ca89526f0 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2026-05-22 08:29:58 +02:00
Francis Appels
e5d7bc0334
FIX: Kit Substock return on shipment cancel/delete (#38373) 2026-05-21 22:15:46 +02:00
John BOTELLA
92e7a03dc4
Fix : product weight default selection (#38374) 2026-05-21 22:12:17 +02:00
Iván Guevara
1213bccb24
Fix: avoid undefined method stdClass::isEmpty() on PHP 8.1 (#38258)
* Fix: avoid undefined method stdClass::isEmpty() on PHP 8.1

This fixes a fatal error when updating product prices on PHP 8.1 due to stdClass object handling.

* Update ProductCombination.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-05-21 22:10:32 +02:00
Laurent Destailleur
7d5777e41f FIX #36777 2026-05-21 22:00:20 +02:00
Christian Humpel
37c0b3eeb6
Fix selectobject.php unknown-Array Key (#23392 AJAX endless turning) (#38323)
* Fix selectobject.php unknown-Array Key

* remove Debug line

* remove Withespace
2026-05-21 21:57:30 +02:00
sonikf
9118a310d1
fix translation for non latin languages (#38334)
* fix translation

* fix translation

* fix phan

* fix phan
2026-05-21 21:55:44 +02:00
Alexandre SPANGARO
92b10c71eb
ChangeLog (#38315) 2026-05-21 21:52:11 +02:00
Laurent Destailleur
7c144b22ff FIX out of dynamically recalculated unit price inc tax was missing
relative discount.
2026-05-21 21:22:58 +02:00
Laurent Destailleur
5efc5e85a9 Fix tags 2026-05-20 17:29:46 +02:00
Laurent Destailleur
38409ec7c0 Automated merge from 22.0 to 23.0 by tool pullmerge.sh 2026-05-20 17:27:41 +02:00
Laurent Destailleur
48cca7954c Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2026-05-20 17:09:31 +02:00
Laurent Destailleur
3bcbb55e7b Automated merge from 20.0 to 21.0 by tool pullmerge.sh 2026-05-20 17:03:28 +02:00
Laurent Destailleur
3fde18d7f7 Automated merge from 19.0 to 20.0 by tool pullmerge.sh 2026-05-20 17:00:35 +02:00
Laurent Destailleur
0168bdfeb1 Automated merge from 18.0 to 19.0 by tool pullmerge.sh 2026-05-20 16:59:16 +02:00
Laurent Destailleur
8e78187c2d Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2026-05-20 16:51:35 +02:00
Laurent Destailleur
03b9f92359 Prepare 22.0.5 2026-05-20 16:51:10 +02:00
Laurent Destailleur
195d700294 Merge branch '23.0' of git@github.com:Dolibarr/dolibarr.git into 23.0 2026-05-18 22:00:32 +02:00
Laurent Destailleur
8815996b9c FIX #36777 2026-05-18 22:00:02 +02:00
Jon Bendtsen
c8bfa410e6
FIX #37356 Category Products not listed (#38264)
* FIX #37356 Category Products not listed

* Will now show product and service categories when 1 or both modules for products or services are enabled #38264

---------

Co-authored-by: Jon Bendtsen <jonbendtsen@jonb.dk>
2026-05-18 11:36:30 +02:00
Jon Bendtsen
1ba11d24da
Fix #37795 supplier_proposal: Project assignment not saved – neither on creation nor after (#38263)
Co-authored-by: Jon Bendtsen <jonbendtsen@jonb.dk>
2026-05-18 03:24:07 +02:00
Jon Bendtsen
c0d303c19d
Fix #38225 webportal member is only in top menu, not on front page (#38257)
Co-authored-by: Jon Bendtsen <jonbendtsen@jonb.dk>
2026-05-18 02:44:08 +02:00
Jon Bendtsen
bc72abc952
The basic issue is that using lowercase mm makes javascript dpChangeDay think minutes and not MONTH (#38266)
Co-authored-by: Jon Bendtsen <jonbendtsen@jonb.dk>
2026-05-18 02:42:47 +02:00
Laurent Destailleur
f0234fa318 Merge branch '23.0' of git@github.com:Dolibarr/dolibarr.git into 23.0 2026-05-18 02:26:54 +02:00
Laurent Destailleur
76821f3c1d Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into 23.0 2026-05-18 02:26:17 +02:00
Jon Bendtsen
6f5bf5c935
FIX #37327 There is no product description displayed in version 22 (#38267)
Co-authored-by: Jon Bendtsen <jonbendtsen@jonb.dk>
2026-05-18 02:22:16 +02:00
Yoan Mollard
8754884a24
fix: Inverted logical condition for showing TVAIsNotUsed only in crabe template (#38271)
Fixes bug introduced in #8e005b19c02435817ecf8207064fd8340245dcd5
2026-05-18 01:55:24 +02:00
Jon Bendtsen
29aa7648e8
Fix api post member subscription returns negative one (#38280)
* Fix #38278 POST to API /members/{id}/subscriptions returns -1

* return the id of the new subscription

---------

Co-authored-by: Jon Bendtsen <jonbendtsen@jonb.dk>
2026-05-18 01:41:32 +02:00
Joachim Kueter
6c342ef754
Fix accountancy_code_*_general stores '-1' from empty dropdown option (#38282)
The empty option in the supplier/customer general account dropdown gets
value='-1' from Form::selectarray. When the form is submitted, GETPOST
returns '-1' and Societe::create()/update() stores it as a string because
the SQL builder's !empty() check accepts '-1' as truthy.

The bookkeeping export in purchasesjournal.php and sellsjournal.php then
uses '-1' as the account code (only bankjournal.php has a != '-1' guard)
and the transfer fails.

Normalize '-1' to '' next to the existing trim() in create() and update()
for both accountancy_code_customer_general and accountancy_code_supplier_general.
The existing SQL !empty() checks then write NULL as intended, and rows
that already contain '-1' self-heal on the next update.
2026-05-18 01:34:28 +02:00
Laurent Destailleur
57d0be7dc9 Fix packaging 23.0.3 2026-05-17 18:19:40 +02:00