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 ( $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 |
my ( $total , $accts, $numaccts) = GetMemberAccountRecords( $borrowernumber ); |
75 |
|
76 |
|
76 |
if ( $checkouts > 0 || $overdues_count > 0 || $holds_pending > 0 || $holds_waiting > 0 || $total > 0 ) { |
77 |
if ( $checkouts > 0 || $overdues_count > 0 || $holds_pending > 0 || $holds_waiting > 0 || $total > 0 ) { |
77 |
$template->param( dashboard_info => 1 ); |
78 |
$template->param( |
|
|
79 |
dashboard_info => 1, |
80 |
checkouts => $checkouts, |
81 |
overdues => $overdues_count, |
82 |
holds_pending => $holds_pending, |
83 |
holds_waiting => $holds_waiting, |
84 |
total_owing => $total, |
85 |
); |
86 |
} |
78 |
} |
87 |
} |
79 |
|
88 |
|
80 |
$template->param( |
89 |
$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, |
90 |
koha_news => $all_koha_news, |
87 |
koha_news_count => $koha_news_count, |
91 |
koha_news_count => $koha_news_count, |
88 |
branchcode => $homebranch, |
92 |
branchcode => $homebranch, |
89 |
- |
|
|