-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
NEW : Stock at date column is sortable / filterable in stockatdate.php page #32215
base: develop
Are you sure you want to change the base?
Conversation
…ibarr into jyhere/filterable-stockatdate
This is a false positive: $stock_at_date is always defined because the condition in which it is found is always the same. But I've modified the code to overwrite the $objp->stock_at_date property instead, which is a useless property in future mode. |
Lets summarize.
The algorithm of the new code.
Looking at code only, your second method seems to be slower compared to old one. Testing on less than 100 000 record is not significant. We know a lot of users of Dolibarr have more than 500 000 reference. I think problem may appears only with such a volume. But may be not. Can someone with a very large database of product/stock/movement can take the code of the new page and run it to say if its ok for them ? |
For the needs of a customer, I reworked the logical part (sql & php) of the stockatdate.php page to be able to sort / filter on the Stock at date column, in particular to be able to output all stock at date greater than 0.
Tested on fairly large volumes (+22000 products, +40000 stock movements), performance was similar to the previous code. (sql part is about 0.25s on by dev laptop for 500 results per page)