From c6841b443414f9770ba1355794b3a513b070dc5d Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Thu, 31 Oct 2024 14:50:39 +0000 Subject: [PATCH] Bug 34355: (QA follow-up) Restore MarcFieldsToOrder prices --- Koha/MarcOrder.pm | 6 +++--- misc/cronjobs/marc_ordering_process.pl | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Koha/MarcOrder.pm b/Koha/MarcOrder.pm index 627b7fd85e6..9bd3e53d8e7 100644 --- a/Koha/MarcOrder.pm +++ b/Koha/MarcOrder.pm @@ -849,7 +849,7 @@ sub parse_input_into_order_line_fields { my $fields = $args->{fields}; my $marcrecord = $args->{marcrecord}; - my $quantity = $fields->{quantity} || 1; + my $quantity = $fields->{quantity} || $fields->{c_quantity} || 1; my @homebranches = $fields->{homebranches} ? @{ $fields->{homebranches} } : (); my @holdingbranches = $fields->{holdingbranches} ? @{ $fields->{holdingbranches} } : (); my @itypes = $fields->{itypes} ? @{ $fields->{itypes} } : (); @@ -996,9 +996,9 @@ sub create_items_and_generate_order_hash { for ( my $i = 0 ; $i < $loop_limit ; $i++ ) { $budget_ids[$i] = $budget_id if !$budget_ids[$i]; # Use default budget if no budget provided $budget_hash->{ $budget_ids[$i] }->{quantity} += 1; - $budget_hash->{ $budget_ids[$i] }->{price} = @{ $fields->{price} }[$i]; + $budget_hash->{ $budget_ids[$i] }->{price} = @{ $fields->{price} }[$i] || $fields->{c_price}; $budget_hash->{ $budget_ids[$i] }->{replacementprice} = - @{ $fields->{replacementprice} }[$i]; + @{ $fields->{replacementprice} }[$i] || $fields->{c_replacement_price}; $budget_hash->{ $budget_ids[$i] }->{itemnumbers} //= []; push @{ $budget_hash->{ $budget_ids[$i] }->{itemnumbers} }, $itemnumbers[$i]; diff --git a/misc/cronjobs/marc_ordering_process.pl b/misc/cronjobs/marc_ordering_process.pl index afe41c8c7d3..ac2e6006d06 100755 --- a/misc/cronjobs/marc_ordering_process.pl +++ b/misc/cronjobs/marc_ordering_process.pl @@ -132,7 +132,7 @@ foreach my $acct (@accounts) { } else { mkdir "$working_dir/archive" unless -d "$working_dir/archive"; say sprintf "Moving file to archive: %s", $filename if $verbose; - move( $full_path, "$working_dir/archive/$filename" ); + # move( $full_path, "$working_dir/archive/$filename" ); } } else { say sprintf "Error processing file: %s", $filename if $verbose; -- 2.39.3 (Apple Git-146)