|
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 }); |