Skip to content

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Jan 8, 2026

Issue: Unable to create backdated outward entry for batch item with available qty.

Ref: 52652

Solution: Since, we are not maintaining posting date and time in stock reservation entry, validation for unreserved batch quantity should also follow the same. Removed posting date & time filter while getting available batch quantities.

Steps to replicate:
(Enable Stock Reservation in Stock Settings)

  1. Create a new Batch Item

  2. Create a new Stock Entry of Type Material Receipt and Select Date as 01-12-25 and enter qty as 300.

  3. Create a another new Stock Entry of Type Material Receipt and Select Date as 23-12-25 and enter qty as 300 and select the same batch that created in Previous Stock Entry.

  4. Create a Sales Order for 450 qty. Create a Pick List and select the batch created by stock entry. And Reserve the Stock

Now Overall batch balance is 600, Reserved qty on that batch is 450 and available to consume is 150 qty.

  1. Now make a back dated Stock Entry of type Material Transfer and select the batch, enter qty as 150.

On submitting this material transfer, system throws error for Stock Reservation. But even after this entry there is enough stock for stock reservation and the stock balance will not go negative.

Summary by CodeRabbit

  • Bug Fixes
    • Refined batch availability filtering during reserved batch allocation, adjusting how eligible batches are identified in the reservation process.

✏️ Tip: You can customize this high-level summary in your review settings.


This is an automatic backport of pull request #51553 done by [Mergify](https://mergify.com).

@github-actions github-actions bot added needs-tests This PR needs automated unit-tests. stock labels Jan 8, 2026
@rohitwaghchaure rohitwaghchaure merged commit 7238636 into version-15 Jan 8, 2026
15 checks passed
@rohitwaghchaure rohitwaghchaure deleted the mergify/bp/version-15/pr-51553 branch January 8, 2026 08:15
@frappe-pr-bot
Copy link
Collaborator

🎉 This PR is included in version 15.94.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

needs-tests This PR needs automated unit-tests. released stock

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants