diff --git a/Koha/Patron.pm b/Koha/Patron.pm
index 7c4ea58d1e..dc329ed706 100644
--- a/Koha/Patron.pm
+++ b/Koha/Patron.pm
@@ -2441,22 +2441,20 @@ sub get_savings {
my $savings = 0;
- # get old issues
- my $old_issues_rs = $self->_result->old_issues;
- my @old_itemnumbers = $old_issues_rs->get_column('itemnumber')->all;
-
- foreach my $itemnumber ( @old_itemnumbers ) {
- my $item = Koha::Items->find( $itemnumber );
- $savings += $item->replacementprice;
+ # get old checkouts
+ my @old_checkouts = $self->old_checkouts->as_list;
+ foreach my $old_checkout ( @old_checkouts ) {
+ if ( $old_checkout->item ) {
+ $savings += $old_checkout->item->replacementprice;
+ }
}
- # get current issues
- my $issues_rs = $self->_result->issues;
- my @itemnumbers = $issues_rs->get_column('itemnumber')->all;
-
- foreach my $itemnumber ( @itemnumbers ) {
- my $item = Koha::Items->find( $itemnumber );
- $savings += $item->replacementprice;
+ # get current checkouts
+ my @checkouts = $self->checkouts->as_list;
+ foreach my $checkout ( @checkouts ) {
+ if ( $checkout->item ) {
+ $savings += $checkout->item->replacementprice;
+ }
}
return $savings;
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
index 15675aa651..342d1853ce 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
@@ -537,6 +537,7 @@ OPAC:
checkouthistory: "on patron's checkout history page (the system preference opacreadinghistory must be enabled)"
summary: "in user summary box on OPAC homepage (the system preference OPACUserSummary must be enabled)"
user: "on patron's 'your summary' page"
+ - ". Note that displayed savings may be inaccurate if checkout history is anonymized."
OpenURL:
-
- 'Complete URL of OpenURL resolver (starting with http://
or https://
):'
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt
index 65a62334d8..1e80809a8a 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt
+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt
@@ -56,7 +56,7 @@