dolibarr/htdocs/expedition/class
support-accellier 7e72304271
FIX #39425 Missing rollback when stock movement fails in Expedition::valid() (#39426)
* Fix missing rollback when stock movement fails in Expedition::valid()

When STOCK_CALCULATE_ON_SHIPMENT is enabled and manageStockMvtOnEvt() fails while validating a shipment, the method returned -2 directly without calling $this->db->rollback(), unlike every other error branch in this method. Changed to increment $error instead, so execution falls through to the existing commit/rollback block at the end of valid().

Fixes #39425

* Update expedition.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-08-13 03:59:28 +02:00
..
api_shipments.class.php Doc example 2026-05-29 12:16:42 +02:00
expedition.class.php FIX #39425 Missing rollback when stock movement fails in Expedition::valid() (#39426) 2026-08-13 03:59:28 +02:00
expeditionligne.class.php Qual: Fix 'SqlInjection' notices (#39221) 2026-07-20 02:51:11 +02:00
expeditionlinebatch.class.php Qual: Fix 'SqlInjection' notices (#39224) 2026-07-20 02:51:54 +02:00
expeditionstats.class.php Qual: Fix 'SqlInjection' notices (#39224) 2026-07-20 02:51:54 +02:00