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 = new CGI; |
35 |
my $input = new CGI; |
35 |
my $dbh = C4::Context->dbh; |
36 |
my $dbh = C4::Context->dbh; |
Lines 83-92
if ( $patron ) {
Link Here
|
83 |
my ( $overdues_count, $overdues ) = checkoverdues($borrowernumber); |
84 |
my ( $overdues_count, $overdues ) = checkoverdues($borrowernumber); |
84 |
my $holds_pending = Koha::Holds->search({ borrowernumber => $borrowernumber, found => undef })->count; |
85 |
my $holds_pending = Koha::Holds->search({ borrowernumber => $borrowernumber, found => undef })->count; |
85 |
my $holds_waiting = Koha::Holds->search({ borrowernumber => $borrowernumber })->waiting->count; |
86 |
my $holds_waiting = Koha::Holds->search({ borrowernumber => $borrowernumber })->waiting->count; |
|
|
87 |
my $patron_messages = Koha::Patron::Messages->search({borrowernumber => $borrowernumber}); |
86 |
|
88 |
|
87 |
my $total = $patron->account->balance; |
89 |
my $total = $patron->account->balance; |
88 |
|
90 |
|
89 |
if ( $checkouts > 0 || $overdues_count > 0 || $holds_pending > 0 || $holds_waiting > 0 || $total > 0 ) { |
91 |
if ( $checkouts > 0 || $overdues_count > 0 || $holds_pending > 0 || $holds_waiting > 0 || $total > 0 || $patron_messages > 0 ) { |
90 |
$template->param( |
92 |
$template->param( |
91 |
dashboard_info => 1, |
93 |
dashboard_info => 1, |
92 |
checkouts => $checkouts, |
94 |
checkouts => $checkouts, |
Lines 94-99
if ( $patron ) {
Link Here
|
94 |
holds_pending => $holds_pending, |
96 |
holds_pending => $holds_pending, |
95 |
holds_waiting => $holds_waiting, |
97 |
holds_waiting => $holds_waiting, |
96 |
total_owing => $total, |
98 |
total_owing => $total, |
|
|
99 |
patron_messages => $patron_messages, |
97 |
); |
100 |
); |
98 |
} |
101 |
} |
99 |
} |
102 |
} |
100 |
- |
|
|