How can I generate random sales order numbers. Thanks in advance for your attention.
Solved! Go to Solution.
Maybe you should explore what happens here:
And then here too:
As you can see the second method is looking for the next value.
I guess you can try a plugin over the Magento\Sales\Model\Order class to change the beforeSave method and change the incrementId.
You'll find, for example, at:
Maybe you've installed from github?
I found the Type.php in /vendor/magento/module-eav/Model/Entity/
BUT made the changes in vendor/magento/module-sales-sequence/Model/Sequence.php
After playing with a number of formulas, I settled on this one.
If anyone has other suggestions, I'll love to hear it.