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

(-)a/Koha/Biblio.pm (+16 lines)
Lines 36-41 use Koha::Acquisition::Orders; Link Here
36
use Koha::ArticleRequest::Status;
36
use Koha::ArticleRequest::Status;
37
use Koha::ArticleRequests;
37
use Koha::ArticleRequests;
38
use Koha::Biblio::Metadatas;
38
use Koha::Biblio::Metadatas;
39
use Koha::Biblio::Volumes;
39
use Koha::Biblioitems;
40
use Koha::Biblioitems;
40
use Koha::CirculationRules;
41
use Koha::CirculationRules;
41
use Koha::Item::Transfer::Limits;
42
use Koha::Item::Transfer::Limits;
Lines 114-119 sub active_orders { Link Here
114
    return $self->orders->search({ datecancellationprinted => undef });
115
    return $self->orders->search({ datecancellationprinted => undef });
115
}
116
}
116
117
118
=head3 volumes
119
120
my $volumes = $biblio->volumes();
121
122
Returns a Koha::Biblio::Volumes object
123
124
=cut
125
126
sub volumes {
127
    my ( $self ) = @_;
128
129
    my $volumes = $self->_result->volumes;
130
    return Koha::Biblio::Volumes->_new_from_dbic($volumes);
131
}
132
117
=head3 can_article_request
133
=head3 can_article_request
118
134
119
my $bool = $biblio->can_article_request( $borrower );
135
my $bool = $biblio->can_article_request( $borrower );
(-)a/Koha/Item.pm (-5 / +24 lines)
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 364-369 sub checkout { Link Here
364
    return Koha::Checkout->_new_from_dbic( $checkout_rs );
364
    return Koha::Checkout->_new_from_dbic( $checkout_rs );
365
}
365
}
366
366
367
=head3 volume
368
369
my $volume = $item->volume;
370
371
Return the volume for this item
372
373
=cut
374
375
sub volume {
376
    my ( $self ) = @_;
377
378
    my $volume_item = $self->_result->volume_items->first;
379
    return unless $volume_item;
380
381
    my $volume_rs = $volume_item->volume;
382
    return unless $volume_rs;
383
384
    return Koha::Biblio::Volume->_new_from_dbic( $volume_rs );
385
}
386
367
=head3 holds
387
=head3 holds
368
388
369
my $holds = $item->holds();
389
my $holds = $item->holds();
370
- 

Return to bug 24857