Lines 27-46
use Try::Tiny;
Link Here
|
27 |
use Koha::Database; |
27 |
use Koha::Database; |
28 |
use Koha::DateUtils qw( dt_from_string ); |
28 |
use Koha::DateUtils qw( dt_from_string ); |
29 |
|
29 |
|
30 |
use C4::Context; |
|
|
31 |
use C4::Circulation; |
32 |
use C4::Reserves; |
33 |
use C4::Biblio qw( ModZebra ); # FIXME This is terrible, we should move the indexation code outside of C4::Biblio |
30 |
use C4::Biblio qw( ModZebra ); # FIXME This is terrible, we should move the indexation code outside of C4::Biblio |
|
|
31 |
use C4::Circulation; |
34 |
use C4::ClassSource; # FIXME We would like to avoid that |
32 |
use C4::ClassSource; # FIXME We would like to avoid that |
|
|
33 |
use C4::Context; |
35 |
use C4::Log qw( logaction ); |
34 |
use C4::Log qw( logaction ); |
|
|
35 |
use C4::Reserves; |
36 |
|
36 |
|
|
|
37 |
use Koha::Biblio::Volumes; |
37 |
use Koha::Checkouts; |
38 |
use Koha::Checkouts; |
38 |
use Koha::CirculationRules; |
39 |
use Koha::CirculationRules; |
39 |
use Koha::Item::Transfer::Limits; |
40 |
use Koha::Item::Transfer::Limits; |
40 |
use Koha::Item::Transfers; |
41 |
use Koha::Item::Transfers; |
|
|
42 |
use Koha::Libraries; |
41 |
use Koha::Patrons; |
43 |
use Koha::Patrons; |
42 |
use Koha::Plugins; |
44 |
use Koha::Plugins; |
43 |
use Koha::Libraries; |
|
|
44 |
use Koha::StockRotationItem; |
45 |
use Koha::StockRotationItem; |
45 |
use Koha::StockRotationRotas; |
46 |
use Koha::StockRotationRotas; |
46 |
|
47 |
|
Lines 339-344
sub checkout {
Link Here
|
339 |
return Koha::Checkout->_new_from_dbic( $checkout_rs ); |
340 |
return Koha::Checkout->_new_from_dbic( $checkout_rs ); |
340 |
} |
341 |
} |
341 |
|
342 |
|
|
|
343 |
=head3 volume |
344 |
|
345 |
my $volume = $item->volume; |
346 |
|
347 |
Return the volume for this item |
348 |
|
349 |
=cut |
350 |
|
351 |
sub volume { |
352 |
my ( $self ) = @_; |
353 |
|
354 |
my $volume_item = $self->_result->volume_items->first; |
355 |
return unless $volume_item; |
356 |
|
357 |
my $volume_rs = $volume_item->volume; |
358 |
return unless $volume_rs; |
359 |
|
360 |
return Koha::Biblio::Volume->_new_from_dbic( $volume_rs ); |
361 |
} |
362 |
|
342 |
=head3 holds |
363 |
=head3 holds |
343 |
|
364 |
|
344 |
my $holds = $item->holds(); |
365 |
my $holds = $item->holds(); |
345 |
- |
|
|