Bug 23522: Show actual price on in baskets
[srvgit] / circ / selectbranchprinter.pl
index cf0af68..0febd0f 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 C4::Context;
@@ -63,6 +62,7 @@ if ( $branch and my $library = Koha::Libraries->find($branch) ) {
         $template->param(LoginBranchcode => $branch);       # update template for new branch
         $session->param('branchname', $branchname);         # update sesssion in DB
         $session->param('branch', $branch);                 # update sesssion in DB
+        $session->flush();
         push @updated, {
             updated_branch => 1,
                 old_branch => $userenv_branch,
@@ -80,6 +80,7 @@ if ( $branch and my $library = Koha::Libraries->find($branch) ) {
 if ($printer) {
     if (! $userenv_printer or $userenv_printer ne $printer ) {
         $session->param('branchprinter', $printer);         # update sesssion in DB
+        $session->flush();
         $template->param('new_printer', $printer);          # update template
         push @updated, {
             updated_printer => 1,
@@ -137,7 +138,4 @@ $template->param(
 # Checking if there is a Fast Cataloging Framework
 $template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
 
-# Checking if the transfer page needs to be displayed
-$template->param( display_transfer => 1 ) if ( ($flags->{'superlibrarian'} == 1) || (C4::Context->preference("IndependentBranches") == 0) );
-
 output_html_with_http_headers $query, $cookie, $template->output;