[Subcontracting] Fix excess reservations on transfer orders (bugs 634399, 634236)#8218
Draft
ChethanT wants to merge 1 commit into
Draft
[Subcontracting] Fix excess reservations on transfer orders (bugs 634399, 634236)#8218ChethanT wants to merge 1 commit into
ChethanT wants to merge 1 commit into
Conversation
…9, 634236) When a subcontracting purchase order quantity is reduced and the production order component has reservations exceeding the new transfer line quantity, block transfer order creation with a clear error message instructing the user to cancel existing reservations first. This prevents inconsistent data states where reservation quantities exceed transfer line quantities, avoiding downstream issues with item tracking and reservation entry corruption. Fixes AB#634399 Fixes AB#634236 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
3c25ffd to
0627dfc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes ADO bugs 634399 and 634236.
When a subcontracting purchase order quantity is reduced and the production order component has reservations exceeding the new transfer line quantity, creating a transfer order would previously transfer all reservations regardless of the transfer line quantity, causing inconsistent reservation states and item tracking corruption.
Fix
Option chosen: Block transfer creation when excess reservations exist.
When the transfer line quantity (based on the reduced PO qty) is less than the total reserved quantity on the production order component, the system now raises an error instructing the user to cancel existing reservations on the component before creating a partial transfer.
This avoids:
The user retains full control: they can manually cancel or adjust reservations on the component and then retry the transfer creation.
Changes
Test Coverage
Fixes AB#634399
Fixes AB#634236