Bug 32021: Don't show 'appear in position' for Pages
[srvgit] / opac / opac-readingrecord.pl
index 3652d00..5598148 100755 (executable)
@@ -54,10 +54,6 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
     }
 );
 
-my $borr = Koha::Patrons->find( $borrowernumber )->unblessed;
-
-$template->param(%{$borr});
-
 my $itemtypes = { map { $_->{itemtype} => $_ } @{ Koha::ItemTypes->search_with_localization->unblessed } };
 
 # get the record
@@ -145,6 +141,12 @@ for(qw(AmazonCoverImages GoogleJackets)) { # BakerTaylorEnabled handled above
        $template->param(JacketImages=>1);
 }
 
+my $saving_display = C4::Context->preference('OPACShowSavings');
+if ( $saving_display =~ /checkouthistory/ ) {
+    my $patron = Koha::Patrons->find( $borrowernumber );
+    $template->param( savings => $patron->get_savings );
+}
+
 $template->param(
     READING_RECORD => $issues,
     limit          => $limit,