From 615ac374321a8e0c972cc7aaa8dba2571e04926f Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Mon, 31 Jul 2023 09:48:18 +0000 Subject: [PATCH] Bug 34445: Set default budget in addorderiso2709.pl This patch allows the default budget to be used as a fallback if no budget is selected. Currently the default budget is set using lines 129-133 but then is never used. Test plan: 1) Apply patch 2) restart_all 3) Follow the steps from the bug description 4) Order lines should be added properly --- acqui/addorderiso2709.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/acqui/addorderiso2709.pl b/acqui/addorderiso2709.pl index fb31a8bcee..cba4c8cd56 100755 --- a/acqui/addorderiso2709.pl +++ b/acqui/addorderiso2709.pl @@ -257,6 +257,7 @@ if ($op eq ""){ # Group orderlines from MarcItemFieldsToOrder my $budget_hash; for (my $i = 0; $i < $count; $i++) { + $budget_codes[$i] = $budget_id if !$budget_codes[$i]; # Use default budget if no budget selected in the UI $budget_hash->{$budget_codes[$i]}->{quantity} += 1; $budget_hash->{$budget_codes[$i]}->{price} = $itemprices[$i]; $budget_hash->{$budget_codes[$i]}->{replacementprice} = $replacementprices[$i]; -- 2.37.1 (Apple Git-137.1)