[Master]Error when creating a Pick "Nothing to handle. The quantity to be picked is in bin W-09-0002, which is not set up for picking." - #9532
Conversation
|
…tingPickNothingtohandle
…tingPickNothingtohandle
|
Could not find linked issues in the pull request description. Please make sure the pull request description contains a line that contains 'Fixes #' followed by the issue number being fixed. Use that pattern for every issue you want to link. |
PredragMaricic
left a comment
There was a problem hiding this comment.
S1 (High): Preserve the existing shipment-bin extensibility contract.
CalcQtyOnShipmentBins manually builds a Ship bin-type filter instead of using CreatePick.GetBinTypeFilter(1), which is already used elsewhere and invokes OnBeforeGetBinTypeFilter. Extensions that customize shipping-bin classification can therefore get inconsistent picked and available quantities. Please reuse the existing extensible filter helper.
S2 (High): Exercise the changed FEFO path.
The production change in CreatePick.Codeunit.al only executes when ReqFEFOPick is true, but the added test does not enable FEFO or item tracking. It also does not assert that the first registered pick used the non-default shipment bin. Please add a FEFO/item-tracked regression that verifies the intended non-default shipment-bin setup.
…Bug-642378-Main-ErrorWhenCreatingPickNothingtohandle
…xtensibility contract.
Bug 642378: [Master][ALL-E] Error when creating a Pick "Nothing to handle. The quantity to be picked is in bin W-09-0002, which is not set up for picking."
Fixes AB#642378
Issue :- Error when creating a Pick "Nothing to handle. The quantity to be picked is in bin W-09-0002, which is not set up for picking."
Cause :-
The failure is in ValidateQtyPickedInShipmentBin in WarehouseAvailabilityMgt.Codeunit.al:904. It checks the picked-not-shipped quantity only in the location's default Shipment Bin Code (W-09-0001). In the repro (step 7) the shipment bin was changed to W-09-0002, so the default ship bin shows 0 → it wrongly sets QtyPicked := 0. That cascades: QtyReservedOnPickShip becomes 0 while ReservedQtyOnInventory stays 160, so CalcAvailabilityAfterReservationImpact(40, 160, 0, 0) returns max(0, 40 − 160) = 0 → "Nothing to handle."
Solution :-
Replaced the single default-bin check with a new helper CalcQtyOnShipmentBins that sums the item's quantity across all Ship-type bins (any bin whose Bin Type has Ship = true), not just the default one. So the 160 in W-09-0002 is correctly recognized, QtyPicked stays 160, QtyReservedOnPickShip = 160, and availability becomes max(0, 40 − 0) = 40 → the pick for 40 succeeds.
The Bin Mandatory + Shipment Bin Code <> '' guard is kept, so locations without a default shipment bin behave exactly as before. Analyzer/compile is clean.
Note: this is verified by full code tracing, not a live BC run — please rebuild and re-run your exact repro to confirm the pick now creates 40.