Lines 27-47
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::Checkouts; |
37 |
use Koha::Checkouts; |
38 |
use Koha::CirculationRules; |
38 |
use Koha::CirculationRules; |
39 |
use Koha::Item::Transfer::Limits; |
39 |
use Koha::Item::Transfer::Limits; |
40 |
use Koha::Item::Transfers; |
40 |
use Koha::Item::Transfers; |
41 |
use Koha::ItemTypes; |
41 |
use Koha::ItemTypes; |
|
|
42 |
use Koha::Libraries; |
42 |
use Koha::Patrons; |
43 |
use Koha::Patrons; |
43 |
use Koha::Plugins; |
44 |
use Koha::Plugins; |
44 |
use Koha::Libraries; |
|
|
45 |
use Koha::StockRotationItem; |
45 |
use Koha::StockRotationItem; |
46 |
use Koha::StockRotationRotas; |
46 |
use Koha::StockRotationRotas; |
47 |
|
47 |
|
Lines 382-387
sub checkout {
Link Here
|
382 |
return Koha::Checkout->_new_from_dbic( $checkout_rs ); |
382 |
return Koha::Checkout->_new_from_dbic( $checkout_rs ); |
383 |
} |
383 |
} |
384 |
|
384 |
|
|
|
385 |
=head3 volume |
386 |
|
387 |
my $volume = $item->volume; |
388 |
|
389 |
Return the volume for this item |
390 |
|
391 |
=cut |
392 |
|
393 |
sub volume { |
394 |
my ( $self ) = @_; |
395 |
|
396 |
my $volume_item = $self->_result->volume_items->first; |
397 |
return unless $volume_item; |
398 |
|
399 |
my $volume_rs = $volume_item->volume; |
400 |
return unless $volume_rs; |
401 |
|
402 |
return Koha::Biblio::Volume->_new_from_dbic( $volume_rs ); |
403 |
} |
404 |
|
385 |
=head3 holds |
405 |
=head3 holds |
386 |
|
406 |
|
387 |
my $holds = $item->holds(); |
407 |
my $holds = $item->holds(); |
388 |
- |
|
|