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

(-)a/C4/Circulation.pm (+13 lines)
Lines 666-671 sticky due date is invalid or due date in the past Link Here
666
666
667
if the borrower borrows to much things
667
if the borrower borrows to much things
668
668
669
=head3 WAITING_RECALL_FOR_A_DIFFERENT_PATRON
670
671
if the item has been recalled by a different patron and the recall status is waiting 'W'
672
669
=cut
673
=cut
670
674
671
sub CanBookBeIssued {
675
sub CanBookBeIssued {
Lines 1023-1028 sub CanBookBeIssued { Link Here
1023
        }
1027
        }
1024
    }
1028
    }
1025
1029
1030
    #CHECK IF ITEM HAS WAITING RECALL FOR ANOTHER PATRON
1031
    if ( C4::Context->preference('UseRecalls') ) {
1032
        my $recall = Koha::Recalls->find({ itemnumber => $item->{'itemnumber'} });
1033
        if ((defined $recall) && ($recall->patron->borrowernumber != $patron->borrowernumber) && $recall->status eq 'W') {
1034
             #Item has been recalled by a different patron and is waiting for them
1035
             $issuingimpossible{WAITING_RECALL_FOR_A_DIFFERENT_PATRON} = 1;
1036
        }
1037
    }
1038
1026
    ## CHECK AGE RESTRICTION
1039
    ## CHECK AGE RESTRICTION
1027
    my $agerestriction  = $biblioitem->agerestriction;
1040
    my $agerestriction  = $biblioitem->agerestriction;
1028
    my ($restriction_age, $daysToAgeRestriction) = GetAgeRestriction( $agerestriction, $patron->unblessed );
1041
    my ($restriction_age, $daysToAgeRestriction) = GetAgeRestriction( $agerestriction, $patron->unblessed );
(-)a/catalogue/detail.pl (-2 / +2 lines)
Lines 334-341 foreach my $item (@items) { Link Here
334
        }
334
        }
335
    }
335
    }
336
336
337
    my $recall = Koha::Recalls->find({ itemnumber => $item->{itemnumber}, old => undef });
337
    my $recall = Koha::Recalls->find({ itemnumber => $item->{itemnumber} });
338
    if (defined $recall){
338
    if (defined $recall && $recall->status ne 'F' && $recall->status ne 'C'){
339
        $item->{recalled} = 1;
339
        $item->{recalled} = 1;
340
        $item->{recall} = $recall;
340
        $item->{recall} = $recall;
341
    }
341
    }
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (+4 lines)
Lines 79-84 Link Here
79
    <div class="dialog alert">Staff members are not allowed to discharge borrowers, nor borrowers to request a discharge.</div>
79
    <div class="dialog alert">Staff members are not allowed to discharge borrowers, nor borrowers to request a discharge.</div>
80
[% END %]
80
[% END %]
81
81
82
82
[% IF ( NEEDSCONFIRMATION ) %]
83
[% IF ( NEEDSCONFIRMATION ) %]
83
<div class="yui-g">
84
<div class="yui-g">
84
85
Lines 313-318 Link Here
313
        [% IF ( INVALID_DATE ) %]
314
        [% IF ( INVALID_DATE ) %]
314
            <li>The due date &quot;[% INVALID_DATE | html %]&quot; is invalid</li>
315
            <li>The due date &quot;[% INVALID_DATE | html %]&quot; is invalid</li>
315
        [% END %]
316
        [% END %]
317
        [% IF ( WAITING_RECALL_FOR_A_DIFFERENT_PATRON ) %]
318
               <li>This item is awaiting pickup by another patron who recalled it.</li>
319
        [% END %]
316
320
317
        [% IF ( UNKNOWN_BARCODE ) %]
321
        [% IF ( UNKNOWN_BARCODE ) %]
318
            <li>The barcode was not found: <span class="ex">[% barcode | html %]</span>
322
            <li>The barcode was not found: <span class="ex">[% barcode | html %]</span>
(-)a/opac/opac-recall.pl (-6 / +6 lines)
Lines 87-99 if ($op eq 'request'){ Link Here
87
            my $recall = Koha::Recalls->find($recall_request->recall_id);
87
            my $recall = Koha::Recalls->find($recall_request->recall_id);
88
            # updating due date on checkout
88
            # updating due date on checkout
89
            my $timestamp = dt_from_string($recall->timestamp);
89
            my $timestamp = dt_from_string($recall->timestamp);
90
            if ($issuing_rule->recall_due_date_interval eq '') {
90
            my $due_date;
91
                my $due_date = $timestamp->add( $issuing_rule->lengthunit => 0 );
91
            if ( $issuing_rule->recall_due_date_interval eq '' ) {
92
                $due_date = $timestamp->add( $issuing_rule->lengthunit => 0 );
92
            } else {
93
            } else {
93
                my $due_date = $timestamp->add( $issuing_rule->lengthunit => $issuing_rule->recall_due_date_interval);
94
                $due_date = $timestamp->add( $issuing_rule->lengthunit => $issuing_rule->recall_due_date_interval );
94
            }
95
            }
95
            my $checkout = Koha::Checkouts->find({ itemnumber = $itemnumber })->update({ date_due => $due_date });
96
            my $checkout = Koha::Checkouts->find({ itemnumber => $itemnumber })->update({ date_due => $due_date });
96
            my $checkout_borrower = $checkout->patron;
97
            my $checkout_borrower = Koha::Patrons->find($checkout->borrowernumber->borrowernumber);
97
98
98
            # send notice to user with recalled item checked out
99
            # send notice to user with recalled item checked out
99
            my $letter = C4::Letters::GetPreparedLetter (
100
            my $letter = C4::Letters::GetPreparedLetter (
100
- 

Return to bug 19532