Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: warehouse not mapping correctly during Delivery Note creation. #42809

Merged
merged 6 commits into from
Sep 16, 2024

Conversation

Vishnu7025
Copy link
Contributor

Wahni.-.SAL-ORD-2024-00003.-.Google.Chrome.2024-08-18.15-20-40.mp4

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Aug 18, 2024
@Vishnu7025
Copy link
Contributor Author

@deepeshgarg007 please check and review

@Vishnu7025
Copy link
Contributor Author

@deepeshgarg007 @ruthra-kumar please check and review

@ruthra-kumar
Copy link
Member

@Vishnu7025
Could you provide replication steps?

@ruthra-kumar ruthra-kumar self-assigned this Sep 3, 2024
@Vishnu7025
Copy link
Contributor Author

@ruthra-kumar Please create a sales order with item X of quantity 10 and reserve the stock in two different warehouses (e.g., 5 in Warehouse A and 5 in Warehouse B). When creating a delivery note from the sales order, the quantity splits based on the reserved stock, but the warehouse remains the same. For more details, please refer to the video above. If you still can't replicate the issue, please let me know.

@Vishnu7025
Copy link
Contributor Author

@ruthra-kumar

@ruthra-kumar
Copy link
Member

@Vishnu7025
The system does correctly pull in the Warehouse from the Sales Order. Given the Stock Reservation Entry (SRE) is made from Sales Order Items and SOI's already have the correct warehouse for each row, the same is copied into Delivery Note item.

sre.mp4

The issue you've mentioned, only happens if Sales Order Item's and its SRE's have a different warehouse.But, I'm not clear on how that scenario can happen. Could you provide an example?

@Vishnu7025
Copy link
Contributor Author

dsdfsd.-.SAL-ORD-2024-00003.-.Google.Chrome.2024-09-09.14-43-29.mp4

@ruthra-kumar Yes, you are correct that the system pulls the warehouse from the Sales Order, and the Delivery Note creation process splits items based on the reserved quantities. However, the issue arises when the same item is stored in different warehouses. In such cases, instead of splitting the items by the specific warehouse as defined in the Sales Order, the system only considers the reserved quantities and not the associated warehouse. For more details, please refer to the video

@ruthra-kumar
Copy link
Member

I've added a test case. Will merge once all test passes.

@ruthra-kumar ruthra-kumar removed the needs-tests This PR needs automated unit-tests. label Sep 9, 2024
@ruthra-kumar ruthra-kumar removed the request for review from deepeshgarg007 September 9, 2024 11:49
@Vishnu7025
Copy link
Contributor Author

Thanks for adding the test case! Let me know if you need any further input. Looking forward to the merge once all tests pass.

@ruthra-kumar ruthra-kumar merged commit 309f74c into frappe:develop Sep 16, 2024
13 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants