Lines 76-82
if (defined $news_id){
Link Here
|
76 |
|
76 |
|
77 |
# For dashboard |
77 |
# For dashboard |
78 |
my $patron = Koha::Patrons->find( $borrowernumber ); |
78 |
my $patron = Koha::Patrons->find( $borrowernumber ); |
79 |
my $borr = $patron->unblessed; |
|
|
80 |
|
79 |
|
81 |
if ( $patron ) { |
80 |
if ( $patron ) { |
82 |
my $checkouts = Koha::Checkouts->search({ borrowernumber => $borrowernumber })->count; |
81 |
my $checkouts = Koha::Checkouts->search({ borrowernumber => $borrowernumber })->count; |
Lines 84-90
if ( $patron ) {
Link Here
|
84 |
my $holds_pending = Koha::Holds->search({ borrowernumber => $borrowernumber, found => undef })->count; |
83 |
my $holds_pending = Koha::Holds->search({ borrowernumber => $borrowernumber, found => undef })->count; |
85 |
my $holds_waiting = Koha::Holds->search({ borrowernumber => $borrowernumber })->waiting->count; |
84 |
my $holds_waiting = Koha::Holds->search({ borrowernumber => $borrowernumber })->waiting->count; |
86 |
my $patron_messages = Koha::Patron::Messages->search({borrowernumber => $borrowernumber}); |
85 |
my $patron_messages = Koha::Patron::Messages->search({borrowernumber => $borrowernumber}); |
87 |
my $patron_note = $borr->{opacnote}; |
86 |
my $patron_note = $patron->opacnote; |
88 |
my $total = $patron->account->balance; |
87 |
my $total = $patron->account->balance; |
89 |
|
88 |
|
90 |
if ( $checkouts > 0 || $overdues_count > 0 || $holds_pending > 0 || $holds_waiting > 0 || $total > 0 || $patron_messages > 0 ) { |
89 |
if ( $checkouts > 0 || $overdues_count > 0 || $holds_pending > 0 || $holds_waiting > 0 || $total > 0 || $patron_messages > 0 ) { |
91 |
- |
|
|