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

(-)a/Koha/Patron.pm (-3 / +9 lines)
Lines 512-525 sub add_enrolment_fee_if_needed { Link Here
512
512
513
=head3 checkouts
513
=head3 checkouts
514
514
515
my $issues = $patron->checkouts
515
my $checkouts = $patron->checkouts
516
516
517
=cut
517
=cut
518
518
519
sub checkouts {
519
sub checkouts {
520
    my ($self) = @_;
520
    my ($self) = @_;
521
    my $issues = $self->_result->issues;
521
    my $checkouts = $self->_result->issues;
522
    return Koha::Checkouts->_new_from_dbic( $issues );
522
    return Koha::Checkouts->_new_from_dbic( $checkouts );
523
}
524
525
sub old_checkouts {
526
    my ($self) = @_;
527
    my $old_checkouts = $self->_result->old_issues;
528
    return Koha::Old::Checkouts->_new_from_dbic( $old_checkouts );
523
}
529
}
524
530
525
=head3 get_overdues
531
=head3 get_overdues
(-)a/Koha/Patrons.pm (-6 / +8 lines)
Lines 168-175 sub anonymise_issue_history { Link Here
168
    # The anonymisation should not fail quietly if AnonymousPatron is not a valid entry
168
    # The anonymisation should not fail quietly if AnonymousPatron is not a valid entry
169
    # Set it to undef (NULL)
169
    # Set it to undef (NULL)
170
    my $dtf = Koha::Database->new->schema->storage->datetime_parser;
170
    my $dtf = Koha::Database->new->schema->storage->datetime_parser;
171
    my $old_issues_to_anonymise = $self->search_related(
171
    my $nb_rows = 0;
172
        'old_issues',
172
    while ( my $patron = $self->next ) {
173
        my $old_issues_to_anonymise = $patron->old_checkouts->search(
173
        {
174
        {
174
            (
175
            (
175
                $older_than_date
176
                $older_than_date
Lines 178-186 sub anonymise_issue_history { Link Here
178
                : ()
179
                : ()
179
            )
180
            )
180
        }
181
        }
181
    );
182
        );
182
    my $anonymous_patron = C4::Context->preference('AnonymousPatron') || undef;
183
        my $anonymous_patron = C4::Context->preference('AnonymousPatron') || undef;
183
    $old_issues_to_anonymise->update( { 'old_issues.borrowernumber' => $anonymous_patron } );
184
        $nb_rows += $old_issues_to_anonymise->update( { 'old_issues.borrowernumber' => $anonymous_patron } );
185
    }
186
    return $nb_rows;
184
}
187
}
185
188
186
=head3 type
189
=head3 type
187
- 

Return to bug 19599