Lines 29-34
use C4::Members;
Link Here
|
29 |
use C4::Overdues; |
29 |
use C4::Overdues; |
30 |
use Koha::Checkouts; |
30 |
use Koha::Checkouts; |
31 |
use Koha::Holds; |
31 |
use Koha::Holds; |
|
|
32 |
use Koha::Patrons; |
32 |
|
33 |
|
33 |
my $input = new CGI; |
34 |
my $input = new CGI; |
34 |
my $dbh = C4::Context->dbh; |
35 |
my $dbh = C4::Context->dbh; |
Lines 72-78
if ( defined $borrowernumber ){
Link Here
|
72 |
my ( $overdues_count, $overdues ) = checkoverdues($borrowernumber); |
73 |
my ( $overdues_count, $overdues ) = checkoverdues($borrowernumber); |
73 |
my $holds_pending = Koha::Holds->search({ borrowernumber => $borrowernumber, found => undef })->count; |
74 |
my $holds_pending = Koha::Holds->search({ borrowernumber => $borrowernumber, found => undef })->count; |
74 |
my $holds_waiting = Koha::Holds->search({ borrowernumber => $borrowernumber })->waiting->count; |
75 |
my $holds_waiting = Koha::Holds->search({ borrowernumber => $borrowernumber })->waiting->count; |
75 |
my ( $total , $accts, $numaccts) = GetMemberAccountRecords( $borrowernumber ); |
76 |
my $patron = Koha::Patrons->find( $borrowernumber ); |
|
|
77 |
my $total = $patron ? $patron->account->balance : 0; |
76 |
|
78 |
|
77 |
if ( $checkouts > 0 || $overdues_count > 0 || $holds_pending > 0 || $holds_waiting > 0 || $total > 0 ) { |
79 |
if ( $checkouts > 0 || $overdues_count > 0 || $holds_pending > 0 || $holds_waiting > 0 || $total > 0 ) { |
78 |
$template->param( dashboard_info => 1 ); |
80 |
$template->param( dashboard_info => 1 ); |