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

(-)a/C4/Circulation.pm (-1 / +2 lines)
Lines 1782-1788 sub AddReturn { Link Here
1782
    }
1782
    }
1783
1783
1784
    # case of a return of document (deal with issues and holdingbranch)
1784
    # case of a return of document (deal with issues and holdingbranch)
1785
    my $today = DateTime->now( time_zone => C4::Context->tz() );
1785
    my $today = dt_from_string( $return_date, 'iso' );
1786
1786
    if ($doreturn) {
1787
    if ($doreturn) {
1787
        my $datedue = $issue->{date_due};
1788
        my $datedue = $issue->{date_due};
1788
        $borrower or warn "AddReturn without current borrower";
1789
        $borrower or warn "AddReturn without current borrower";
(-)a/C4/SIP/ILS.pm (-1 / +1 lines)
Lines 181-187 sub checkin { Link Here
181
    $circ->item($item = new ILS::Item $item_id);
181
    $circ->item($item = new ILS::Item $item_id);
182
182
183
    if ($item) {
183
    if ($item) {
184
        $circ->do_checkin($current_loc);
184
        $circ->do_checkin($current_loc, $return_date);
185
    } else {
185
    } else {
186
        $circ->alert(1);
186
        $circ->alert(1);
187
        $circ->alert_type(99);
187
        $circ->alert_type(99);
(-)a/C4/SIP/ILS/Transaction/Checkin.pm (-2 / +16 lines)
Lines 16-21 use C4::Circulation; Link Here
16
use C4::Reserves qw( ModReserveAffect );
16
use C4::Reserves qw( ModReserveAffect );
17
use C4::Items qw( ModItemTransfer );
17
use C4::Items qw( ModItemTransfer );
18
use C4::Debug;
18
use C4::Debug;
19
use Koha::DateUtils;
19
20
20
use parent qw(ILS::Transaction);
21
use parent qw(ILS::Transaction);
21
22
Lines 47-58 sub new { Link Here
47
sub do_checkin {
48
sub do_checkin {
48
    my $self = shift;
49
    my $self = shift;
49
    my $branch = shift;
50
    my $branch = shift;
51
    my $return_date = shift;
50
    if (!$branch) {
52
    if (!$branch) {
51
        $branch = 'SIP2';
53
        $branch = 'SIP2';
52
    }
54
    }
53
    my $barcode = $self->{item}->id;
55
    my $barcode = $self->{item}->id;
56
57
    $return_date =   substr( $return_date, 0, 4 )
58
                   . '-'
59
                   . substr( $return_date, 4, 2 )
60
                   . '-'
61
                   . substr( $return_date, 6, 2 )
62
                   . q{ }
63
                   . substr( $return_date, 12, 2 )
64
                   . ':'
65
                   . substr( $return_date, 14, 2 )
66
                   . ':'
67
                   . substr( $return_date, 16, 2 );
68
54
    $debug and warn "do_checkin() calling AddReturn($barcode, $branch)";
69
    $debug and warn "do_checkin() calling AddReturn($barcode, $branch)";
55
    my ($return, $messages, $iteminformation, $borrower) = AddReturn($barcode, $branch);
70
    my ($return, $messages, $iteminformation, $borrower) = AddReturn($barcode, $branch, undef, undef, $return_date);
56
    $self->alert(!$return);
71
    $self->alert(!$return);
57
    # ignoring messages: NotIssued, IsPermanent, WasLost, WasTransfered
72
    # ignoring messages: NotIssued, IsPermanent, WasLost, WasTransfered
58
73
59
- 

Return to bug 8769