Lines 67-88
my $koha_news_count = scalar @$all_koha_news;
Link Here
|
67 |
my $quote = GetDailyQuote(); # other options are to pass in an exact quote id or select a random quote each pass... see perldoc C4::Koha |
67 |
my $quote = GetDailyQuote(); # other options are to pass in an exact quote id or select a random quote each pass... see perldoc C4::Koha |
68 |
|
68 |
|
69 |
# For dashboard |
69 |
# For dashboard |
70 |
my $checkouts = Koha::Checkouts->search({ borrowernumber => $borrowernumber })->count; |
70 |
if ( defined $borrowernumber ){ |
71 |
my ( $overdues_count, $overdues ) = checkoverdues($borrowernumber); |
71 |
my $checkouts = Koha::Checkouts->search({ borrowernumber => $borrowernumber })->count; |
72 |
my $holds_pending = Koha::Holds->search({ borrowernumber => $borrowernumber, found => undef })->count; |
72 |
my ( $overdues_count, $overdues ) = checkoverdues($borrowernumber); |
73 |
my $holds_waiting = Koha::Holds->search({ borrowernumber => $borrowernumber })->waiting->count; |
73 |
my $holds_pending = Koha::Holds->search({ borrowernumber => $borrowernumber, found => undef })->count; |
74 |
my ( $total , $accts, $numaccts) = GetMemberAccountRecords( $borrowernumber ); |
74 |
my $holds_waiting = Koha::Holds->search({ borrowernumber => $borrowernumber })->waiting->count; |
75 |
|
75 |
my ( $total , $accts, $numaccts) = GetMemberAccountRecords( $borrowernumber ); |
76 |
if ( $checkouts > 0 || $overdues_count > 0 || $holds_pending > 0 || $holds_waiting > 0 || $total > 0 ) { |
76 |
|
77 |
$template->param( dashboard_info => 1 ); |
77 |
if ( $checkouts > 0 || $overdues_count > 0 || $holds_pending > 0 || $holds_waiting > 0 || $total > 0 ) { |
|
|
78 |
$template->param( dashboard_info => 1 ); |
79 |
} |
80 |
|
81 |
$template->param( |
82 |
checkouts => $checkouts, |
83 |
overdues => $overdues_count, |
84 |
holds_pending => $holds_pending, |
85 |
holds_waiting => $holds_waiting, |
86 |
total_owing => $total, |
87 |
); |
78 |
} |
88 |
} |
79 |
|
89 |
|
80 |
$template->param( |
90 |
$template->param( |
81 |
checkouts => $checkouts, |
|
|
82 |
overdues => $overdues_count, |
83 |
holds_pending => $holds_pending, |
84 |
holds_waiting => $holds_waiting, |
85 |
total_owing => $total, |
86 |
koha_news => $all_koha_news, |
91 |
koha_news => $all_koha_news, |
87 |
koha_news_count => $koha_news_count, |
92 |
koha_news_count => $koha_news_count, |
88 |
branchcode => $homebranch, |
93 |
branchcode => $homebranch, |
89 |
- |
|
|