From d46ae16d7fd8de533a70c4ab3cf1cc5be24a4906 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Wed, 24 Jul 2024 10:21:26 +0200 Subject: [PATCH] Bug 37247: [23.05.x] Send Koha::Subscription to template Signed-off-by: wainuiwitikapark --- serials/subscription-detail.pl | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/serials/subscription-detail.pl b/serials/subscription-detail.pl index 7532447b13..86a4e0cbb6 100755 --- a/serials/subscription-detail.pl +++ b/serials/subscription-detail.pl @@ -121,13 +121,11 @@ my @irregular_issues = split /;/, $subs->{irregularity}; my $frequency = C4::Serials::Frequency::GetSubscriptionFrequency($subs->{periodicity}); my $numberpattern = C4::Serials::Numberpattern::GetSubscriptionNumberpattern($subs->{numberpattern}); -my $subscription_object = Koha::Subscriptions->find( $subscriptionid ); +my $subscription = Koha::Subscriptions->find( $subscriptionid ); + $template->param( available_additional_fields => Koha::AdditionalFields->search( { tablename => 'subscription' } ), - additional_field_values => { - map { $_->field->name => $_->value } - $subscription_object->additional_field_values->as_list - }, + additional_field_values => { map { $_->field->name => $_->value } $subscription->additional_field_values->as_list }, ); # FIXME Do we want to hide canceled orders? @@ -148,6 +146,7 @@ while ( my $o = $orders->next ) { } $template->param( + subscription => $subscription, subscriptionid => $subscriptionid, serialslist => \@serialslist, hasRouting => $hasRouting, -- 2.39.5