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

(-)a/C4/Circulation.pm (-2 / +2 lines)
Lines 1569-1575 patron who last borrowed the book. Link Here
1569
=cut
1569
=cut
1570
1570
1571
sub AddReturn {
1571
sub AddReturn {
1572
    my ( $barcode, $branch, $exemptfine, $dropbox ) = @_;
1572
    my ( $barcode, $branch, $exemptfine, $dropbox, $return_date ) = @_;
1573
1573
1574
    if ($branch and not GetBranchDetail($branch)) {
1574
    if ($branch and not GetBranchDetail($branch)) {
1575
        warn "AddReturn error: branch '$branch' not found.  Reverting to " . C4::Context->userenv->{'branch'};
1575
        warn "AddReturn error: branch '$branch' not found.  Reverting to " . C4::Context->userenv->{'branch'};
Lines 1670-1676 sub AddReturn { Link Here
1670
              );
1670
              );
1671
        }
1671
        }
1672
            }
1672
            }
1673
            MarkIssueReturned($borrowernumber, $item->{'itemnumber'}, $circControlBranch, '', $borrower->{'privacy'});
1673
            MarkIssueReturned($borrowernumber, $item->{'itemnumber'}, $circControlBranch, $return_date, $borrower->{'privacy'});
1674
            $messages->{'WasReturned'} = 1;    # FIXME is the "= 1" right?  This could be the borrower hash.
1674
            $messages->{'WasReturned'} = 1;    # FIXME is the "= 1" right?  This could be the borrower hash.
1675
        }
1675
        }
1676
1676
(-)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 / +2 lines)
Lines 47-58 sub new { Link Here
47
sub do_checkin {
47
sub do_checkin {
48
    my $self = shift;
48
    my $self = shift;
49
    my $branch = shift;
49
    my $branch = shift;
50
    my $return_date = shift;
50
    if (!$branch) {
51
    if (!$branch) {
51
        $branch = 'SIP2';
52
        $branch = 'SIP2';
52
    }
53
    }
53
    my $barcode = $self->{item}->id;
54
    my $barcode = $self->{item}->id;
54
    $debug and warn "do_checkin() calling AddReturn($barcode, $branch)";
55
    $debug and warn "do_checkin() calling AddReturn($barcode, $branch)";
55
    my ($return, $messages, $iteminformation, $borrower) = AddReturn($barcode, $branch);
56
    my ($return, $messages, $iteminformation, $borrower) = AddReturn($barcode, $branch, undef, undef, $return_date);
56
    $self->alert(!$return);
57
    $self->alert(!$return);
57
    # ignoring messages: NotIssued, IsPermanent, WasLost, WasTransfered
58
    # ignoring messages: NotIssued, IsPermanent, WasLost, WasTransfered
58
59
59
- 

Return to bug 8769