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

(-)a/C4/Circulation.pm (-2 / +3 lines)
Lines 1736-1742 patron who last borrowed the book. Link Here
1736
=cut
1736
=cut
1737
1737
1738
sub AddReturn {
1738
sub AddReturn {
1739
    my ( $barcode, $branch, $exemptfine, $dropbox, $return_date ) = @_;
1739
    my ( $barcode, $branch, $exemptfine, $dropbox, $return_date, $dropboxdate ) = @_;
1740
1740
1741
    if ($branch and not GetBranchDetail($branch)) {
1741
    if ($branch and not GetBranchDetail($branch)) {
1742
        warn "AddReturn error: branch '$branch' not found.  Reverting to " . C4::Context->userenv->{'branch'};
1742
        warn "AddReturn error: branch '$branch' not found.  Reverting to " . C4::Context->userenv->{'branch'};
Lines 1851-1857 sub AddReturn { Link Here
1851
            # FIXME: check issuedate > returndate, factoring in holidays
1851
            # FIXME: check issuedate > returndate, factoring in holidays
1852
            #$circControlBranch = _GetCircControlBranch($item,$borrower) unless ( $item->{'issuedate'} eq C4::Dates->today('iso') );;
1852
            #$circControlBranch = _GetCircControlBranch($item,$borrower) unless ( $item->{'issuedate'} eq C4::Dates->today('iso') );;
1853
            $circControlBranch = _GetCircControlBranch($item,$borrower);
1853
            $circControlBranch = _GetCircControlBranch($item,$borrower);
1854
            $issue->{'overdue'} = DateTime->compare($issue->{'date_due'}, $today ) == -1 ? 1 : 0;
1854
            $issue->{'overdue'} = DateTime->compare($issue->{'date_due'}, $dropboxdate ) == -1 ? 1 : 0;
1855
        }
1855
        }
1856
1856
1857
        if ($borrowernumber) {
1857
        if ($borrowernumber) {
Lines 1950-1955 sub AddReturn { Link Here
1950
        
1950
        
1951
        if ( $issue->{overdue} && $issue->{date_due} ) {
1951
        if ( $issue->{overdue} && $issue->{date_due} ) {
1952
        # fix fine days
1952
        # fix fine days
1953
            $today = $dropboxdate if $dropbox;
1953
            my ($debardate,$reminder) = _debar_user_on_return( $borrower, $item, $issue->{date_due}, $today );
1954
            my ($debardate,$reminder) = _debar_user_on_return( $borrower, $item, $issue->{date_due}, $today );
1954
            if ($reminder){
1955
            if ($reminder){
1955
                $messages->{'PrevDebarred'} = $debardate;
1956
                $messages->{'PrevDebarred'} = $debardate;
(-)a/circ/returns.pl (-4 / +11 lines)
Lines 241-247 if ($barcode) { Link Here
241
# save the return
241
# save the return
242
#
242
#
243
    ( $returned, $messages, $issueinformation, $borrower ) =
243
    ( $returned, $messages, $issueinformation, $borrower ) =
244
      AddReturn( $barcode, $userenv_branch, $exemptfine, $dropboxmode, $return_date_override );
244
      AddReturn( $barcode, $userenv_branch, $exemptfine, $dropboxmode, $return_date_override, $dropboxdate );
245
    my $homeorholdingbranchreturn = C4::Context->preference('HomeOrHoldingBranchReturn');
245
    my $homeorholdingbranchreturn = C4::Context->preference('HomeOrHoldingBranchReturn');
246
    $homeorholdingbranchreturn ||= 'homebranch';
246
    $homeorholdingbranchreturn ||= 'homebranch';
247
247
Lines 287-293 if ($barcode) { Link Here
287
        $riduedate{0}          = $duedate;
287
        $riduedate{0}          = $duedate;
288
        $input{borrowernumber} = $borrower->{'borrowernumber'};
288
        $input{borrowernumber} = $borrower->{'borrowernumber'};
289
        $input{duedate}        = $duedate;
289
        $input{duedate}        = $duedate;
290
        $input{return_overdue} = 1 if (DateTime->compare($issueinformation->{date_due}, $time_now) == -1);
290
        unless ( $dropboxmode ) {
291
            $input{return_overdue} = 1 if (DateTime->compare($issueinformation->{date_due}, DateTime->now()) == -1);
292
        } else {
293
            $input{return_overdue} = 1 if (DateTime->compare($issueinformation->{date_due}, $dropboxdate) == -1);
294
        }
291
        push( @inputloop, \%input );
295
        push( @inputloop, \%input );
292
296
293
        if ( C4::Context->preference("FineNotifyAtCheckin") ) {
297
        if ( C4::Context->preference("FineNotifyAtCheckin") ) {
Lines 533-539 foreach ( sort { $a <=> $b } keys %returneditems ) { Link Here
533
            $ri{minute}   = $duedate->minute();
537
            $ri{minute}   = $duedate->minute();
534
            $ri{duedate} = output_pref($duedate);
538
            $ri{duedate} = output_pref($duedate);
535
            my ($b)      = GetMemberDetails( $riborrowernumber{$_}, 0 );
539
            my ($b)      = GetMemberDetails( $riborrowernumber{$_}, 0 );
536
            $ri{return_overdue} = 1 if (DateTime->compare($duedate, DateTime->now()) == -1 );
540
            unless ( $dropboxmode ) {
541
                $ri{return_overdue} = 1 if (DateTime->compare($duedate, DateTime->now()) == -1);
542
            } else {
543
                $ri{return_overdue} = 1 if (DateTime->compare($duedate, $dropboxdate) == -1);
544
            }
537
            $ri{borrowernumber} = $b->{'borrowernumber'};
545
            $ri{borrowernumber} = $b->{'borrowernumber'};
538
            $ri{borcnum}        = $b->{'cardnumber'};
546
            $ri{borcnum}        = $b->{'cardnumber'};
539
            $ri{borfirstname}   = $b->{'firstname'};
547
            $ri{borfirstname}   = $b->{'firstname'};
540
- 

Return to bug 12895