|
Lines 32-37
use Koha::DateUtils qw( dt_from_string );
Link Here
|
| 32 |
|
32 |
|
| 33 |
use base qw(Koha::Object); |
33 |
use base qw(Koha::Object); |
| 34 |
|
34 |
|
|
|
35 |
use Koha::Acquisition::Orders; |
| 35 |
use Koha::ArticleRequest::Status; |
36 |
use Koha::ArticleRequest::Status; |
| 36 |
use Koha::ArticleRequests; |
37 |
use Koha::ArticleRequests; |
| 37 |
use Koha::Biblio::Metadatas; |
38 |
use Koha::Biblio::Metadatas; |
|
Lines 82-87
sub metadata {
Link Here
|
| 82 |
return Koha::Biblio::Metadata->_new_from_dbic($metadata); |
83 |
return Koha::Biblio::Metadata->_new_from_dbic($metadata); |
| 83 |
} |
84 |
} |
| 84 |
|
85 |
|
|
|
86 |
=head3 orders |
| 87 |
|
| 88 |
my $orders = $biblio->orders(); |
| 89 |
|
| 90 |
Returns a Koha::Acquisition::Orders object |
| 91 |
|
| 92 |
=cut |
| 93 |
|
| 94 |
sub orders { |
| 95 |
my ( $self ) = @_; |
| 96 |
|
| 97 |
my $orders = $self->_result->orders; |
| 98 |
return Koha::Acquisition::Orders->_new_from_dbic($orders); |
| 99 |
} |
| 100 |
|
| 101 |
=head3 orders_count |
| 102 |
|
| 103 |
my $orders_count = $biblio->orders_count(); |
| 104 |
|
| 105 |
Returns the number of acquisition orders related to this biblio. |
| 106 |
|
| 107 |
=cut |
| 108 |
|
| 109 |
sub orders_count { |
| 110 |
my ( $self ) = @_; |
| 111 |
|
| 112 |
return $self->orders->count; |
| 113 |
} |
| 114 |
|
| 85 |
=head3 can_article_request |
115 |
=head3 can_article_request |
| 86 |
|
116 |
|
| 87 |
my $bool = $biblio->can_article_request( $borrower ); |
117 |
my $bool = $biblio->can_article_request( $borrower ); |