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

(-)a/Core/Community/Circulation.pm (+49 lines)
Line 0 Link Here
1
package Core::Community::Circulation;
2
3
use strict;
4
use warnings;
5
6
use Carp;
7
use Data::Dumper;
8
use C4::Circulation;
9
10
use Core::Exceptions;
11
use parent qw( Core::Circulation Core::Prefs );
12
13
=head
14
  legacy support for C4::Circulation::AddReturn
15
=cut
16
sub Checkin {
17
  my ($self, $exemptFine, $dropBox, $returnDate, $dropBoxDate) = @_;
18
  my ($doreturn, $messages, $iteminformation, $borrower) =
19
    C4::Circulation::AddReturn( $self->{item}->barcode, $self->{library}->branchcode, $exemptFine, $dropBox, $returnDate );
20
  $doreturn or $self->{error} = Core::Exception::Circulation::CheckinError->new();
21
22
  $self->{messages} = $messages;
23
  $self->{patron} = Koha::Patrons->find($borrower->{borrowernumber});
24
  return $self;
25
}
26
27
=head
28
  legacy support for C4::Circulation::AddIssue
29
=cut
30
sub Checkout {
31
  my ($self, $dateDue, $cancelReserve, $issueDate, $sipMode, $params) = @_;
32
  my $issue = C4::Circulation::AddIssue( $self->{patron}->unblessed, $self->{item}->barcode, $dateDue, $cancelReserve, $issueDate, $sipMode, $params );
33
  $self->{checkout} = $issue;
34
  $issue or $self->{error} = Core::Exception::Circulation::CheckoutError->new();
35
  return $self;
36
}
37
38
=head
39
  legacy support for C4::Circulation::AddRenewal
40
=cut
41
42
sub Renew {
43
  my ($self, $dateDue, $lastRenewedDate) = @_;
44
  my $newDateDue = C4::Circulation::AddRenewal( $self->{patron}->borrowernumber, $self->{item}->itemnumber, $self->{library}->branchcode, $dateDue, $lastRenewedDate);
45
  $newDateDue or $self->{error} = Core::Exception::Circulation::RenewError->new();
46
  return $self, $newDateDue;
47
}
48
49
1;
(-)a/Core/Community/Circulation/SIP.pm (-1 / +37 lines)
Line 0 Link Here
0
- 
1
package Core::Community::Circulation::SIP;
2
3
# Deichman SIP Overrides
4
# Trying to stay sane
5
6
use strict;
7
use warnings;
8
9
use Data::Dumper;
10
use Carp;
11
use DateTime;
12
use Time::HiRes;
13
use Koha::Items;
14
use Koha::Patrons;
15
use Koha::Libraries;
16
17
use parent "Core::Community::Circulation";
18
19
sub testOverride {
20
  warn "TEST: Core::Community::Circulation overridden from Core::Community::Circulation::SIP\n";
21
}
22
23
sub Checkin {
24
    my ( $self, $returnDate ) = @_;
25
    $self->SUPER::Checkin($returnDate);
26
27
    # SIP Server cannot handle multiple return messages?
28
    return $self;
29
}
30
=head
31
=cut
32
sub Checkout {
33
    my ( $self, $dateDue ) = @_;
34
    return $self->SUPER::Checkout($dateDue);
35
}
36
37
1;

Return to bug 21327