View | Details | Raw Unified | Return to bug 19938
Collapse All | Expand All

(-)a/C4/Overdues.pm (-4 / +4 lines)
Lines 145-153 LEFT JOIN biblioitems USING (biblioitemnumber) Link Here
145
145
146
=head2 checkoverdues
146
=head2 checkoverdues
147
147
148
    ($count, $overdueitems) = checkoverdues($borrowernumber);
148
    my $overdueitems = checkoverdues($borrowernumber);
149
    my $count = $overdueitems ? scalar(@$overdueitems) : 0;
149
150
150
Returns a count and a list of overdueitems for a given borrowernumber
151
Returns a list of overdueitems for a given borrowernumber
151
152
152
=cut
153
=cut
153
154
Lines 190-197 sub checkoverdues { Link Here
190
            AND   issues.date_due < NOW()"
191
            AND   issues.date_due < NOW()"
191
    );
192
    );
192
    $sth->execute($borrowernumber);
193
    $sth->execute($borrowernumber);
193
    my $results = $sth->fetchall_arrayref({});
194
    return $sth->fetchall_arrayref({});
194
    return ( scalar(@$results), $results);  # returning the count and the results is silly
195
}
195
}
196
196
197
=head2 CalcFine
197
=head2 CalcFine
(-)a/misc/cronjobs/staticfines.pl (-2 / +2 lines)
Lines 128-138 INIT { Link Here
128
$debug and (defined $borrowernumberlimit) and print "--borrower limitation: borrower $borrowernumberlimit\n";
128
$debug and (defined $borrowernumberlimit) and print "--borrower limitation: borrower $borrowernumberlimit\n";
129
my ($numOverdueItems, $data);
129
my ($numOverdueItems, $data);
130
if (defined $borrowernumberlimit) {
130
if (defined $borrowernumberlimit) {
131
    ($numOverdueItems, $data) = checkoverdues($borrowernumberlimit);
131
    $data = checkoverdues($borrowernumberlimit);
132
} else {
132
} else {
133
    $data = Getoverdues();
133
    $data = Getoverdues();
134
    $numOverdueItems = scalar @$data;
135
}
134
}
135
$numOverdueItems = $data ? scalar(@$data) : 0;
136
my $overdueItemsCounted = 0;
136
my $overdueItemsCounted = 0;
137
my %calendars           = ();
137
my %calendars           = ();
138
$today      = dt_from_string;
138
$today      = dt_from_string;
(-)a/opac/opac-main.pl (-2 / +2 lines)
Lines 68-74 my $quote = GetDailyQuote(); # other options are to pass in an exact quote id Link Here
68
68
69
# For dashboard
69
# For dashboard
70
my $checkouts = Koha::Checkouts->search({ borrowernumber => $borrowernumber })->count;
70
my $checkouts = Koha::Checkouts->search({ borrowernumber => $borrowernumber })->count;
71
my ( $overdues_count, $overdues ) = checkoverdues($borrowernumber);
71
my $overdues = checkoverdues($borrowernumber);
72
my $overdues_count = $overdues ? scalar(@$overdues) : 0;
72
my $holds_pending = Koha::Holds->search({ borrowernumber => $borrowernumber, found => undef })->count;
73
my $holds_pending = Koha::Holds->search({ borrowernumber => $borrowernumber, found => undef })->count;
73
my $holds_waiting = Koha::Holds->search({ borrowernumber => $borrowernumber })->waiting->count;
74
my $holds_waiting = Koha::Holds->search({ borrowernumber => $borrowernumber })->waiting->count;
74
my ( $total , $accts, $numaccts) = GetMemberAccountRecords( $borrowernumber );
75
my ( $total , $accts, $numaccts) = GetMemberAccountRecords( $borrowernumber );
75
- 

Return to bug 19938