All items are properly serialised, as they were checked out with the serial numbers.
The return asks me to identify which serial numbers are returning, I input the same serial numbers and that action turns the quantity to a positive number. Which creates the error.
Changing the quantity manually back to a negative number, removes the serial number.
This is an error in ERPNEXT
because the batch number of the material is not correctly filled in the detail line of the sales delivery order. If you need to use the batch number, you can manually specify it, so that the return will be returned according to the original batch number
I have encountered the same issue with the batch number and serial number during testing. If we plan to use them in an actual environment, I suggest developing a script to implement it or manually adding it to the sales and delivery details.