Bug 27332: Use the branchcode from the subscription when renewing
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 5 Jan 2021 07:10:33 +0000 (08:10 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 23 Feb 2021 12:16:07 +0000 (13:16 +0100)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-renew.tt
serials/subscription-renew.pl

index 13222ad..614a21a 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Branches %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 [% IF subscription %]
@@ -64,9 +65,7 @@
             <option value="">None</option>
         [% END %]
         [% IF CAN_user_serials_superserials %]
-            [% FOREACH library IN libraries %]
-                <option value="[% library.branchcode | html %]"> [% library.branchname | html %] </option>
-            [% END %]
+            [% PROCESS options_for_libraries libraries => Branches.all(selected => subscription.branchcode) %]
         [% END %]
     </select> (select a library)
     </li>
index 94f0f50..80727da 100755 (executable)
@@ -129,11 +129,8 @@ if ( $op eq "renew" ) {
     );
 }
 
-my $libraries = Koha::Libraries->search( {}, { order_by => ['branchcode'] }, );
-
 $template->param(
     op => $op,
-    libraries      => $libraries,
 );
 
 output_html_with_http_headers $query, $cookie, $template->output;