From db58df286cbcbff1bef1e1fb91819967afd5a575 Mon Sep 17 00:00:00 2001 From: Andreas Jonsson Date: Sat, 13 Jan 2024 13:38:10 +0000 Subject: [PATCH] Bug 35805: Use transport cost matrix if local item allocation failed --- C4/HoldsQueue.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/HoldsQueue.pm b/C4/HoldsQueue.pm index f58406f5bd..85d2bf3820 100644 --- a/C4/HoldsQueue.pm +++ b/C4/HoldsQueue.pm @@ -568,7 +568,7 @@ sub MapItemsToHoldRequests { } $holdingbranch = $pickup_branch; } - elsif ($transport_cost_matrix) { + if (!defined $itemnumber && defined $transport_cost_matrix) { $pull_branches = [keys %items_by_branch]; $holdingbranch = least_cost_branch( $pickup_branch, $pull_branches, $transport_cost_matrix ); if ( $holdingbranch ) { -- 2.39.2