From f768e8fabef5ef7234f1e3da0409b5554db5fff0 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Mon, 26 Aug 2024 20:11:48 +0000 Subject: [PATCH] Bug 37551: Only delete price when there is already an itemprice To test: 1. Have a mrc file with some different prices. In my case I am using the mrc file attached here with different price values in the 975$p and 975$a 2. Set the MarcFieldsToOrder to "price: 975$p" and MarcItemFieldsToOrder to "price: 975$a" 3. In Acquisitions create a new basket > add to basket > from a new file 4. The value from MarcFieldsToOrder (975$p) is always set as the price when it should be the value from MarcItemFieldsToOrder (975$a) 5. APPLY PATCH, restart_all 6. Try steps 1 - 3 again, this time item price should be correctly handled. --- acqui/addorderiso2709.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acqui/addorderiso2709.pl b/acqui/addorderiso2709.pl index 4b4d899031a..4948beaab08 100755 --- a/acqui/addorderiso2709.pl +++ b/acqui/addorderiso2709.pl @@ -535,7 +535,7 @@ sub import_biblios_list { $iteminfos->{location} = delete $iteminfos->{loc} if $iteminfos->{loc}; $iteminfos->{copynumber} = delete $iteminfos->{copyno} if $iteminfos->{copyno}; # Price is handled as "itemprice" in the UI form to distinguish from MarcFieldsToOrder - $iteminfos->{itemprice} = delete $iteminfos->{price} if $iteminfos->{price}; + $iteminfos->{itemprice} = delete $iteminfos->{price} if $iteminfos->{itemprice}; # Convert budge code to a budget id my $item_budget_code = delete $iteminfos->{budget_code}; -- 2.39.2