@@ -, +, @@
---
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt | 8 +++-----
opac/opac-main.pl | 3 +--
2 files changed, 4 insertions(+), 7 deletions(-)
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt
@@ -216,12 +216,10 @@
[% total_owing | $Price with_symbol => 1 %] due in fines and charges
[% END %]
[% IF opacnote %]
- [% message_note_count = patron_messages.count + 1 %]
- [% ELSE %]
- [% message_note_count = patron_mssages.count %]
+ 1 note
[% END %]
- [% IF (patron_messages && patron_messages.count > 0) || opacnote %]
- [% message_note_count | html %] message(s)
+ [% IF patron_messages && patron_messages.count > 0 %]
+ [% patron_messages.count | html %] message(s)
[% END %]
--- a/opac/opac-main.pl
+++ a/opac/opac-main.pl
@@ -76,7 +76,6 @@ if (defined $news_id){
# For dashboard
my $patron = Koha::Patrons->find( $borrowernumber );
-my $borr = $patron->unblessed;
if ( $patron ) {
my $checkouts = Koha::Checkouts->search({ borrowernumber => $borrowernumber })->count;
@@ -84,7 +83,7 @@ if ( $patron ) {
my $holds_pending = Koha::Holds->search({ borrowernumber => $borrowernumber, found => undef })->count;
my $holds_waiting = Koha::Holds->search({ borrowernumber => $borrowernumber })->waiting->count;
my $patron_messages = Koha::Patron::Messages->search({borrowernumber => $borrowernumber});
- my $patron_note = $borr->{opacnote};
+ my $patron_note = $patron->opacnote;
my $total = $patron->account->balance;
if ( $checkouts > 0 || $overdues_count > 0 || $holds_pending > 0 || $holds_waiting > 0 || $total > 0 || $patron_messages > 0 ) {
--