+ my @branches = Koha::Libraries->search( {}, { order_by => ['branchcode'] } );
+ my @branches_loop;
+ foreach my $b ( @branches ) {
+ my $selected = 0;
+ $selected = 1 if( defined $branch and $branch eq $b->branchcode );
+ push @branches_loop, {
+ branchcode => $b->branchcode,
+ branchname => $b->branchname,
+ selected => $selected,
+ };
+ }
+
+ $template->param(
+ openedsubscriptions => \@openedsubscriptions,
+ closedsubscriptions => \@closedsubscriptions,
+ total => @openedsubscriptions + @closedsubscriptions,
+ title_filter => $title,
+ ISSN_filter => $ISSN,
+ EAN_filter => $EAN,
+ callnumber_filter => $callnumber,
+ publisher_filter => $publisher,
+ bookseller_filter => $bookseller,
+ branch_filter => $branch,
+ location_filter => $location,
+ expiration_date_filter => $expiration_date_dt,
+ branches_loop => \@branches_loop,
+ done_searched => $searched,
+ routing => $routing,
+ additional_field_filters => $additional_field_filters,
+ additional_fields_for_subscription => $additional_fields,
+ marcflavour => (uc(C4::Context->preference("marcflavour"))),
+ mana => $mana
+ );
+}