[QM] Fix internal put-away from Quality Inspection sourcing wrong bin#9168
Conversation
Resolve the source bin for the Create Internal Put-away disposition from the item's actual Bin Content in bin mandatory locations, instead of guessing it from the source document naming conventions which returned stale receive bins or bins without content. Also validate all resolved source bins for receive bins up front before creating any document, so we no longer emit a 'created' notification for a put-away that is then rolled back. Fixes AB#640117
Copilot PR ReviewIteration 2 · Outcome: completed Knowledge source: https://github.com/microsoft/BCQuality@822cae1b2771ac25f665f73369f69093bd4fd630 Orchestrator pre-filter (13 file(s) excluded)
Findings produced by the Copilot CLI agent against BCQuality at |
…tification The failed-document notification printed the raw instruction quantity, which is zero for behaviors that resolve the quantity later (failed/passed sample count), so it misleadingly read '0 PCS'. Fall back to the quantity the user intended to move based on the quantity behavior. Related to AB#641562
Agentic PR Review - Round 1Recommendation: Request ChangesWhat this PR doesThis PR changes Quality Management internal put-away creation so non-tracked inventory at bin-mandatory locations is sourced from current Bin Content instead of the source document bin. It also validates receive bins before document creation and improves the failed-notification quantity. The direction matches the linked bug: after a purchase receipt is put away, the receive bin is stale and the internal put-away must use the bin that now holds the inventory. The receive-bin precheck is also placed before document creation, which avoids the old created-then-rolled-back notification. However, the new Bin Content resolver can return more than one bin, and the existing quantity-buffer logic applies the full requested quantity to each returned bin. That makes the fix unsafe when the item exists in multiple valid bins. SuggestionsS1 - Allocates the requested quantity once S2 - Adds regression coverage for this flow Risk assessment and necessityRisk: This touches warehouse source-bin selection for internal put-aways. A wrong result can create a put-away from the wrong bin or for too much quantity. No public API signature or BaseApp event publisher dependency was introduced, but the behavior change is in sensitive warehouse flow logic. Necessity: The linked Bug is clear and important. The reported WHITE scenario cannot create the internal put-away for the failed quantity because the flow uses a receive or stale bin after the receipt put-away. A fix is needed, but it must preserve the requested quantity across multi-bin inventory.
|
alexei-dobriansky
left a comment
There was a problem hiding this comment.
Review the suggestions
| TempToMoveBinContent."Min. Qty." := QuantityBaseValue; | ||
| TempToMoveBinContent.Insert(false); | ||
| if LocationCode <> '' then | ||
| // In bin mandatory locations (including directed put-away and pick) the bin derived from the source |
There was a problem hiding this comment.
don't leave so many comments, simply put everything to PR description.
Resolve the source bin for the Create Internal Put-away disposition from the item's actual Bin Content in bin mandatory locations, instead of guessing it from the source document naming conventions which returned stale receive bins or bins without content.
Also validate all resolved source bins for receive bins up front before creating any document, so we no longer emit a 'created' notification for a put-away that is then rolled back.
Fixes AB#641562
Needs a backport to 28.x to fix the original Work Item.