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

(-)a/Koha/Checkout.pm (+21 lines)
Lines 181-186 sub booking { Link Here
181
    return Koha::Booking->_new_from_dbic($booking_rs);
181
    return Koha::Booking->_new_from_dbic($booking_rs);
182
}
182
}
183
183
184
=head3 quota
185
186
my $quota = $checkout->quota;
187
188
Return the checked out quota
189
190
=cut
191
192
sub quota {
193
    my ($self) = @_;
194
    my $usage_rs = $self->_result->quota_usages->search(
195
        {},
196
        {
197
            rows     => 1,
198
            order_by => { '-desc' => 'creation_date' }
199
        }
200
    )->single;
201
    return unless $usage_rs;
202
    return Koha::Patron::Quota->_new_from_dbic( $usage_rs->patron_quota );
203
}
204
184
=head3 attempt_auto_renew
205
=head3 attempt_auto_renew
185
206
186
  my ($success, $error, $updated) = $checkout->auto_renew({ confirm => 1 });
207
  my ($success, $error, $updated) = $checkout->auto_renew({ confirm => 1 });
(-)a/Koha/Patron/Quotas.pm (-1 / +12 lines)
Lines 2-7 package Koha::Patron::Quotas; Link Here
2
2
3
use base qw(Koha::Objects);
3
use base qw(Koha::Objects);
4
use Modern::Perl;
4
use Modern::Perl;
5
use base qw(Koha::Objects);
6
5
use Koha::Patron::Quota;
7
use Koha::Patron::Quota;
6
use Koha::Patrons;
8
use Koha::Patrons;
7
9
Lines 65-68 sub object_class { Link Here
65
    return 'Koha::Patron::Quota';
67
    return 'Koha::Patron::Quota';
66
}
68
}
67
69
70
=head3 koha_object_class
71
72
Returns the package name for patron quota objects
73
74
=cut
75
76
sub koha_object_class {
77
    return 'Koha::Patron::Quota';
78
}
79
68
1;
80
1;
69
- 

Return to bug 38924