The problem
Dolibarr’s Stock at date page tells you how many units you held on a given day. Useful, but not enough to close a period:
- no cost-price valuation, although that is the figure expected at closing;
- no total — the page lists, it never adds up;
- products at zero that never moved are listed like the rest. On a catalogue of several thousand references the screen becomes unreadable and the pagination misleading.
What the module adds
A “Cost price” column, valued at the stock of the date you chose — not at today’s stock, which would make no sense on a dated screen.
Four totals displayed above the list: weighted average price valuation, cost price, sale value and current stock.
A “Hide products at 0 with no movement” checkbox, tickable on the page itself. Its starting state is set in the module configuration.
How it is built
Everything is computed by the database. Totals come from an aggregate query and the column from a correlated expression. Nothing is summed in PHP: the page can list thousands of products, and loading them to add them up would be untenable.
No core file is modified. The module works through the native hooks of the stockatdate context, so a Dolibarr upgrade never has to be re-patched.
Requirements
- Dolibarr 20.0 or later, PHP 7.4+
- The native Stocks module






Reviews
There are no reviews yet.