Order number setting not have proper validation
-
When setting up order settings in the Admin panel (Configuration > Sales > Order Settings > Order Number Settings), if I do not select an Order Number Length, then neither a prefix nor a suffix is added to the order number. Additionally, the length field is not mandatory.
This led me to initially believe that this setting wasn't functioning correctly.
-
Hello there,
Which version of Bagisto are you using?
-
I am using version 1.5.1.
-
We have identified two possible solutions:
First, we can make the length field required and set the validation to be greater than 0.
The second solution involves allowing the admin to add a prefix or suffix, with or without specifying a length.
To implement this, we need to make changes in the following file:
Packages > Webkul > Sales > src > Generators > Sequencer.php
In the generate method, modify the condition to:
if ($this->prefix || $this->suffix) in line number 113