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

(-)a/C4/Circulation.pm (-2 / +6 lines)
Lines 1630-1635 overdue charges are applied and C<$dropbox> is true, the last charge Link Here
1630
will be removed.  This assumes that the fines accrual script has run
1630
will be removed.  This assumes that the fines accrual script has run
1631
for _today_.
1631
for _today_.
1632
1632
1633
=item C<$return_date> indicates that the check-in date is assumed to be
1634
this given date. If overdue charges are applied, the last charges
1635
will be based on this return date.
1636
1633
=back
1637
=back
1634
1638
1635
C<&AddReturn> returns a list of four items:
1639
C<&AddReturn> returns a list of four items:
Lines 1683-1689 patron who last borrowed the book. Link Here
1683
=cut
1687
=cut
1684
1688
1685
sub AddReturn {
1689
sub AddReturn {
1686
    my ( $barcode, $branch, $exemptfine, $dropbox ) = @_;
1690
    my ( $barcode, $branch, $exemptfine, $dropbox, $return_date) = @_;
1687
1691
1688
    if ($branch and not GetBranchDetail($branch)) {
1692
    if ($branch and not GetBranchDetail($branch)) {
1689
        warn "AddReturn error: branch '$branch' not found.  Reverting to " . C4::Context->userenv->{'branch'};
1693
        warn "AddReturn error: branch '$branch' not found.  Reverting to " . C4::Context->userenv->{'branch'};
Lines 1780-1786 sub AddReturn { Link Here
1780
              );
1784
              );
1781
        }
1785
        }
1782
            }
1786
            }
1783
            MarkIssueReturned($borrowernumber, $item->{'itemnumber'}, $circControlBranch, '', $borrower->{'privacy'});
1787
            MarkIssueReturned($borrowernumber, $item->{'itemnumber'}, $circControlBranch, $return_date, $borrower->{'privacy'});
1784
            $messages->{'WasReturned'} = 1;    # FIXME is the "= 1" right?  This could be the borrower hash.
1788
            $messages->{'WasReturned'} = 1;    # FIXME is the "= 1" right?  This could be the borrower hash.
1785
        }
1789
        }
1786
1790
(-)a/C4/SIP/ILS/Transaction/Checkin.pm (-6 / +4 lines)
Lines 46-58 sub new { Link Here
46
46
47
sub do_checkin {
47
sub do_checkin {
48
    my $self = shift;
48
    my $self = shift;
49
    my $branch = shift;
49
    my $branch = shift || 'SIP2';
50
    if (!$branch) {
50
    my $return_date = shift;
51
        $branch = 'SIP2';
51
52
    }
53
    my $barcode = $self->{item}->id;
52
    my $barcode = $self->{item}->id;
54
    $debug and warn "do_checkin() calling AddReturn($barcode, $branch)";
53
    $debug and warn "do_checkin() calling AddReturn($barcode, $branch)";
55
    my ($return, $messages, $iteminformation, $borrower) = AddReturn($barcode, $branch);
54
    my ($return, $messages, $iteminformation, $borrower) = AddReturn($barcode, $branch, undef, undef, $return_date);
56
    $self->alert(!$return);
55
    $self->alert(!$return);
57
    # ignoring messages: NotIssued, IsPermanent, WasLost, WasTransfered
56
    # ignoring messages: NotIssued, IsPermanent, WasLost, WasTransfered
58
57
59
- 

Return to bug 8769