Stock reversal movements use current date instead of original document date (reception delete/cancel, shipment delete/cancel, reverseMovement)
Author: BoushabazakariaCreated Sep 30, 2026Updated Sep 30, 2026
LabelsBug
Bug
Problem
When cancelling, deleting, or reverting a stock movement linked to a reception (BR) or shipment (BL), the reversal stock movement is created with today's date instead of the original document date
This causes incorrect stock valuations at past dates (e.g. end-of-month stock reports show wrong quantities for periods between the original document date and the cancellation date)
Dolibarr Version
22
Environment PHP
No response
Environment Database
No response
Steps to reproduce the behavior and expected behavior
Steps to reproduce
- Enable
STOCK_CALCULATE_ON_RECEPTIONorSTOCK_CALCULATE_ON_SHIPMENT - Create and validate a reception (BR) with a past date (e.g. 2026-08-10)
- Delete or cancel the reception
- Check stock movements → the reversal movement has today's date instead of 2026-08-10
Same behaviour with:
- Shipment (BL) delete / cancel / reopen
- Mass action "Reverse" on stock movement list
Attached files
No response
Source: Dolibarr/dolibarr