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

(-)a/Koha/Biblio.pm (-1 / +1 lines)
Lines 1164-1170 sub get_marc_host { Link Here
1164
1164
1165
=head3 recalls
1165
=head3 recalls
1166
1166
1167
    my @recalls = $biblio->recalls;
1167
    my $recalls = $biblio->recalls;
1168
1168
1169
Return all active recalls attached to this biblio, sorted by oldest first
1169
Return all active recalls attached to this biblio, sorted by oldest first
1170
1170
(-)a/Koha/Recall.pm (-7 / +11 lines)
Lines 21-29 use Modern::Perl; Link Here
21
21
22
use Koha::Database;
22
use Koha::Database;
23
use Koha::DateUtils qw( dt_from_string );
23
use Koha::DateUtils qw( dt_from_string );
24
use Koha::Patron;
24
use Koha::Biblios;
25
use Koha::Biblio;
25
use Koha::Items;
26
use Koha::Item;
26
use Koha::Libraries;
27
use Koha::Patrons;
27
28
28
use base qw(Koha::Object);
29
use base qw(Koha::Object);
29
30
Lines 33-39 Koha::Recall - Koha Recall Object class Link Here
33
34
34
=head1 API
35
=head1 API
35
36
36
=head2 Internal methods
37
=head2 Class methods
37
38
38
=cut
39
=cut
39
40
Lines 77-83 Returns the related Koha::Patron object for this recall. Link Here
77
78
78
sub patron {
79
sub patron {
79
    my ( $self ) = @_;
80
    my ( $self ) = @_;
80
    my $patron_rs = $self->_result->borrower;
81
    my $patron_rs = $self->_result->patron;
81
    return unless $patron_rs;
82
    return unless $patron_rs;
82
    return Koha::Patron->_new_from_dbic( $patron_rs );
83
    return Koha::Patron->_new_from_dbic( $patron_rs );
83
}
84
}
Lines 92-99 Returns the related Koha::Library object for this recall. Link Here
92
93
93
sub library {
94
sub library {
94
    my ( $self ) = @_;
95
    my ( $self ) = @_;
95
    $self->{_library} = Koha::Libraries->find( $self->branchcode );
96
    my $library_rs = $self->_result->library;
96
    return $self->{_library};
97
    return unless $library_rs;
98
    return Koha::Library->_new_from_dbic( $library_rs );
97
}
99
}
98
100
99
=head3 checkout
101
=head3 checkout
Lines 465-470 sub set_finished { Link Here
465
    return $self;
467
    return $self;
466
}
468
}
467
469
470
=head2 Internal methods
471
468
=head3 _type
472
=head3 _type
469
473
470
=cut
474
=cut
(-)a/Koha/Schema/Result/Recall.pm (-3 / +2 lines)
Lines 293-306 __PACKAGE__->belongs_to( Link Here
293
);
293
);
294
294
295
__PACKAGE__->belongs_to(
295
__PACKAGE__->belongs_to(
296
  "borrower",
296
  "patron",
297
  "Koha::Schema::Result::Borrower",
297
  "Koha::Schema::Result::Borrower",
298
  { borrowernumber => "borrowernumber" },
298
  { borrowernumber => "borrowernumber" },
299
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
299
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
300
);
300
);
301
301
302
__PACKAGE__->belongs_to(
302
__PACKAGE__->belongs_to(
303
  "branch",
303
  "library",
304
  "Koha::Schema::Result::Branch",
304
  "Koha::Schema::Result::Branch",
305
  { branchcode => "branchcode" },
305
  { branchcode => "branchcode" },
306
  {
306
  {
307
- 

Return to bug 19532