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 |
|
87 |
if ( $checkouts > 0 || $overdues_count > 0 || $holds_pending > 0 || $holds_waiting > 0 || $total > 0 ) { |
93 |
if ( $checkouts > 0 || $overdues_count > 0 || $holds_pending > 0 || $holds_waiting > 0 || $total > 0 || $patron_messages > 0 || $patron_note > 0 ) { |
88 |
$template->param( |
94 |
$template->param( |
89 |
dashboard_info => 1, |
95 |
dashboard_info => 1, |
90 |
checkouts => $checkouts, |
96 |
checkouts => $checkouts, |
Lines 92-97
if ( $patron ) {
Link Here
|
92 |
holds_pending => $holds_pending, |
98 |
holds_pending => $holds_pending, |
93 |
holds_waiting => $holds_waiting, |
99 |
holds_waiting => $holds_waiting, |
94 |
total_owing => $total, |
100 |
total_owing => $total, |
|
|
101 |
patron_messages => $patron_messages, |
102 |
opacnote => $patron_note, |
95 |
); |
103 |
); |
96 |
} |
104 |
} |
97 |
} |
105 |
} |
98 |
- |
|
|