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 328-335 foreach my $item (@items) { Link Here
328
        }
328
        }
329
    }
329
    }
330
330
331
    my $recall = Koha::Recalls->find({ itemnumber => $item->{itemnumber}, old => undef });
331
    my $recall = Koha::Recalls->find({ itemnumber => $item->{itemnumber} });
332
    if (defined $recall){
332
    if (defined $recall && $recall->status ne 'F' && $recall->status ne 'C'){
333
        $item->{recalled} = 1;
333
        $item->{recalled} = 1;
334
        $item->{recall} = $recall;
334
        $item->{recall} = $recall;
335
    }
335
    }
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (+5 lines)
Lines 78-83 Link Here
78
    <div class="dialog alert">Staff members are not allowed to discharge borrowers, nor borrowers to request a discharge.</div>
78
    <div class="dialog alert">Staff members are not allowed to discharge borrowers, nor borrowers to request a discharge.</div>
79
[% END %]
79
[% END %]
80
80
81
81
[% IF ( NEEDSCONFIRMATION ) %]
82
[% IF ( NEEDSCONFIRMATION ) %]
82
<div class="yui-g">
83
<div class="yui-g">
83
84
Lines 313-318 Link Here
313
            <li>The due date &quot;[% INVALID_DATE %]&quot; is invalid</li>
314
            <li>The due date &quot;[% INVALID_DATE %]&quot; is invalid</li>
314
        [% END %]
315
        [% END %]
315
316
317
        [% IF ( WAITING_RECALL_FOR_A_DIFFERENT_PATRON ) %]
318
            <li>This item is awaiting pickup by another patron who recalled it.</li>
319
        [% END %]
320
316
        [% IF ( UNKNOWN_BARCODE ) %]
321
        [% IF ( UNKNOWN_BARCODE ) %]
317
            <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>
318
323
(-)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