Bug 18316: (follow-up) Koha::SearchField::search_marc_maps return a result set -...
[koha.git] / catalogue / labeledMARCdetail.pl
index 090326d..9b51051 100755 (executable)
@@ -17,8 +17,7 @@
 # You should have received a copy of the GNU General Public License
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
-use strict;
-use warnings;
+use Modern::Perl;
 use CGI qw ( -utf8 ); 
 use HTML::Entities;
 use MARC::Record;
@@ -28,6 +27,7 @@ use C4::Output;
 use C4::Biblio;
 use C4::Items;
 use C4::Search;                # enabled_staff_search_views
+use C4::Serials;
 use C4::Acquisition qw(GetOrdersByBiblionumber);
 
 use Koha::Biblios;
@@ -56,7 +56,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     }
 );
 
-my $record = GetMarcBiblio($biblionumber);
+my $record = GetMarcBiblio({ biblionumber => $biblionumber });
 if ( not defined $record ) {
     # biblionumber invalid -> report and exit
     $template->param( unknownbiblionumber => 1,
@@ -122,6 +122,7 @@ $template->param (
        labeledmarcview => 1,
        z3950_search_params             => C4::Search::z3950_search_args($biblio),
        C4::Search::enabled_staff_search_views,
+    subscriptionsnumber => CountSubscriptionFromBiblionumber($biblionumber),
     searchid            => scalar $query->param('searchid'),
 );