Lines 30-35
use C4::Overdues;
Link Here
|
30 |
use Koha::Checkouts; |
30 |
use Koha::Checkouts; |
31 |
use Koha::Holds; |
31 |
use Koha::Holds; |
32 |
use Koha::News; |
32 |
use Koha::News; |
|
|
33 |
use Koha::Patron::Messages; |
33 |
|
34 |
|
34 |
my $input = CGI->new; |
35 |
my $input = CGI->new; |
35 |
my $dbh = C4::Context->dbh; |
36 |
my $dbh = C4::Context->dbh; |
Lines 81-90
if ( $patron ) {
Link Here
|
81 |
my ( $overdues_count, $overdues ) = checkoverdues($borrowernumber); |
82 |
my ( $overdues_count, $overdues ) = checkoverdues($borrowernumber); |
82 |
my $holds_pending = Koha::Holds->search({ borrowernumber => $borrowernumber, found => undef })->count; |
83 |
my $holds_pending = Koha::Holds->search({ borrowernumber => $borrowernumber, found => undef })->count; |
83 |
my $holds_waiting = Koha::Holds->search({ borrowernumber => $borrowernumber })->waiting->count; |
84 |
my $holds_waiting = Koha::Holds->search({ borrowernumber => $borrowernumber })->waiting->count; |
84 |
|
85 |
my $patron_messages = Koha::Patron::Messages->search( |
|
|
86 |
{ |
87 |
borrowernumber => $borrowernumber, |
88 |
message_type => 'B', |
89 |
}); |
90 |
my $patron_note = $patron->opacnote; |
85 |
my $total = $patron->account->balance; |
91 |
my $total = $patron->account->balance; |
86 |
|
92 |
if ( $checkouts > 0 || $overdues_count > 0 || $holds_pending > 0 || $holds_waiting > 0 || $total > 0 || $patron_note || $patron_messages->count ) { |
87 |
if ( $checkouts > 0 || $overdues_count > 0 || $holds_pending > 0 || $holds_waiting > 0 || $total > 0 ) { |
|
|
88 |
$template->param( |
93 |
$template->param( |
89 |
dashboard_info => 1, |
94 |
dashboard_info => 1, |
90 |
checkouts => $checkouts, |
95 |
checkouts => $checkouts, |
Lines 92-97
if ( $patron ) {
Link Here
|
92 |
holds_pending => $holds_pending, |
97 |
holds_pending => $holds_pending, |
93 |
holds_waiting => $holds_waiting, |
98 |
holds_waiting => $holds_waiting, |
94 |
total_owing => $total, |
99 |
total_owing => $total, |
|
|
100 |
patron_messages => $patron_messages, |
101 |
opacnote => $patron_note, |
95 |
); |
102 |
); |
96 |
} |
103 |
} |
97 |
} |
104 |
} |
98 |
- |
|
|