frappe / erpnext

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

Stock Entry Repack Issues- Scanned Batch No. Not Used in Serial and Batch Bundle #36273

Open pmjd-code opened 1 year ago

pmjd-code commented 1 year ago

Information about bug

Using the Repack option in a Stock Entry to change one batch of an item into a new batch of another item. In v14 this works as expected, I can scan the Batch No, it populates the fields, I enter a new Item Code etc. and it is successfully Repacked to a new Item and new Batch No. However, it is not working the same in the Develop branch.

Not Working - Using Barcode Scan Field to Enter Batch No

When the Batch No 000002 is scanned using the Scan Barcode field on the DocType, image it is correctly recognised and populates the Stock Entry Item field as expected. Though why doesn't it know the Warehouse that the item is located in and populate it? Even if it was a Batch split in several locations, why does this not filter the Warehouse selection options? Screenshot 2023-07-24 at 11-11-54 New Stock Entry - new-stock-entry-2

A different warehouse, new item code, and quantity is entered as as required. The Repack is submitted, the original Batch No is correct,and no new Batch info is displayed but the option to view the Batch/Serial No are now visible after a refresh. Screenshot 2023-07-24 at 11-13-06 Repack - MAT-STE-2023-00026

However, on viewing the Batch No information, a different Batch with the same Item Code has been used in the Repack, not the Batch No selected. Screenshot 2023-07-24 at 11-13-39 Serial and Batch Summary

Working With Issues - Entering Via Line Item

If I enter the Item Code directly in the line item, a more cumbersome way surely?, the dialog box appears to enter the Batch Nos, the scan of the Batch No is recognised correctly and the source warehouse again is not filtered and has to be selected. Screenshot 2023-07-24 at 11-37-04 New Stock Entry - new-stock-entry-1

Once Add Batch Nos is pressed the following warning appears, even though you didn't select the target warehouse and it shouldn't really be available as an option. Screenshot 2023-07-24 at 11-37-20 New Stock Entry - new-stock-entry-1

The requisite information is entered for the Repack as before

Screenshot 2023-07-24 at 11-38-11 Repack - MAT-STE-2023-00027

But on Submit the following error appears Screenshot 2023-07-24 at 11-38-23 Repack - MAT-STE-2023-00027

After manually intervening and changing the Serial and Batch Bundle from Inward to Outward, saving and not submitting the SBB, I can then successfully submit the Repack. On refresh there are no Batch details, as is the way of things now. On viewing the Batch Nos report, the correct item and Batch No has been successfully repacked. image

Issues

Module

stock

Version

Frappe version - develop, updated 09:00 GMT 24 Jul 2023 ERPNext version - develop, updated 09:00 GMT 24 Jul 2023

Installation method

manual install

Relevant log output / Stack trace / Full Error Message.

No response

pmjd-code commented 1 year ago

@s-aga-r is this an issue with the Serial and Batch Bundle implementation?

pmjd-code commented 1 year ago

Just updated to latest development branch and tried again, issue with Inward/Outward seems to have been resolved.

s-aga-r commented 1 year ago

@s-aga-r is this an issue with the Serial and Batch Bundle implementation?

Serial and Batch Bundle is added in v15 (develop).

pmjd-code commented 1 year ago

Serial and Batch Bundle is added in v15 (develop).

Yes and that is the version I'm reporting the error in, please let me know if anything in my report is unclear or ambiguous.