frappe / erpnext

Free and Open Source Enterprise Resource Planning (ERP)
https://erpnext.com
GNU General Public License v3.0
20.85k stars 7.15k forks source link

Wrong Serial Number getting fetched in Sales Return #7508

Closed Olawale1 closed 7 years ago

Olawale1 commented 7 years ago

Hi,

We've encountered an issue where the wrong serial number is being fetched in Sales Return invoices. You can replicate this if you have serials that are created at different times for an item in the same warehouse (In our case, the serials were created via Stock Entries of type 'Material Receipt' at different times). Select a more recent serial in a Sales Invoice and Submit. After that, do a Sales Return. An older serial number for the same item (in the same warehouse) is what automatically appears in the serial number field!

There seems to be some logic that makes the oldest serial number (by Creation Date) in the warehouse automatically appear in the Serial Number field instead of the Serial Number from the original invoice

Kindly help check this

Regards

Olawale1 commented 7 years ago

I think I've found the cause of this. There's an option in Stock Settings 'Automatically Set Serial Nos based on FIFO' which is checked by default. Unchecking this option seems to resolve the issue

I would suggest that the system ignores this logic when creating Sales Returns so that users are not compelled to turn the feature off

Thanks