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

(-)a/C4/Circulation.pm (-1 / +11 lines)
Lines 36-42 use C4::Message; Link Here
36
use C4::Debug;
36
use C4::Debug;
37
use C4::Branch; # GetBranches
37
use C4::Branch; # GetBranches
38
use C4::Log; # logaction
38
use C4::Log; # logaction
39
use C4::Koha qw(GetAuthorisedValueByCode);
39
use C4::Koha qw(
40
    GetAuthorisedValueByCode
41
    GetAuthValCode
42
    GetKohaAuthorisedValueLib
43
);
40
use C4::Overdues qw(CalcFine UpdateFine);
44
use C4::Overdues qw(CalcFine UpdateFine);
41
use Algorithm::CheckDigits;
45
use Algorithm::CheckDigits;
42
46
Lines 833-840 sub CanBookBeIssued { Link Here
833
    {
837
    {
834
        if(!C4::Context->preference("AllowNotForLoanOverride")){
838
        if(!C4::Context->preference("AllowNotForLoanOverride")){
835
            $issuingimpossible{NOT_FOR_LOAN} = 1;
839
            $issuingimpossible{NOT_FOR_LOAN} = 1;
840
            $issuingimpossible{item_notforloan} = $item->{'notforloan'};
836
        }else{
841
        }else{
837
            $needsconfirmation{NOT_FOR_LOAN_FORCING} = 1;
842
            $needsconfirmation{NOT_FOR_LOAN_FORCING} = 1;
843
            $needsconfirmation{item_notforloan} = $item->{'notforloan'};
838
        }
844
        }
839
    }
845
    }
840
    elsif ( !$item->{'notforloan'} ){
846
    elsif ( !$item->{'notforloan'} ){
Lines 848-863 sub CanBookBeIssued { Link Here
848
            if ($notforloan->{'notforloan'}) {
854
            if ($notforloan->{'notforloan'}) {
849
                if (!C4::Context->preference("AllowNotForLoanOverride")) {
855
                if (!C4::Context->preference("AllowNotForLoanOverride")) {
850
                    $issuingimpossible{NOT_FOR_LOAN} = 1;
856
                    $issuingimpossible{NOT_FOR_LOAN} = 1;
857
                    $issuingimpossible{itemtype_notforloan} = $item->{'itype'};
851
                } else {
858
                } else {
852
                    $needsconfirmation{NOT_FOR_LOAN_FORCING} = 1;
859
                    $needsconfirmation{NOT_FOR_LOAN_FORCING} = 1;
860
                    $needsconfirmation{itemtype_notforloan} = $item->{'itype'};
853
                }
861
                }
854
            }
862
            }
855
        }
863
        }
856
        elsif ($biblioitem->{'notforloan'} == 1){
864
        elsif ($biblioitem->{'notforloan'} == 1){
857
            if (!C4::Context->preference("AllowNotForLoanOverride")) {
865
            if (!C4::Context->preference("AllowNotForLoanOverride")) {
858
                $issuingimpossible{NOT_FOR_LOAN} = 1;
866
                $issuingimpossible{NOT_FOR_LOAN} = 1;
867
                $issuingimpossible{itemtype_notforloan} = $biblioitem->{'itemtype'};
859
            } else {
868
            } else {
860
                $needsconfirmation{NOT_FOR_LOAN_FORCING} = 1;
869
                $needsconfirmation{NOT_FOR_LOAN_FORCING} = 1;
870
                $needsconfirmation{itemtype_notforloan} = $biblioitem->{'itemtype'};
861
            }
871
            }
862
        }
872
        }
863
    }
873
    }
(-)a/circ/circulation.pl (+6 lines)
Lines 287-292 if ($barcode) { Link Here
287
287
288
    $template->param( alert => $alerts );
288
    $template->param( alert => $alerts );
289
289
290
    #  Get the item title for more information
291
    my $getmessageiteminfo = GetBiblioFromItemNumber(undef,$barcode);
292
    $template->param(
293
        authvalcode_notforloan => C4::Koha::GetAuthValCode('items.notforloan', $getmessageiteminfo->{'frameworkcode'}),
294
    );
295
290
    delete $question->{'DEBT'} if ($debt_confirmed);
296
    delete $question->{'DEBT'} if ($debt_confirmed);
291
    foreach my $impossible ( keys %$error ) {
297
    foreach my $impossible ( keys %$error ) {
292
        $template->param(
298
        $template->param(
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-3 / +18 lines)
Lines 1-4 Link Here
1
[% USE KohaDates %]
1
[% USE KohaDates %]
2
[% USE KohaAuthorisedValues %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
[% INCLUDE 'doc-head-open.inc' %]
3
[% SET destination = "circ" %]
4
[% SET destination = "circ" %]
4
<title>Koha &rsaquo; Circulation
5
<title>Koha &rsaquo; Circulation
Lines 359-365 function validate1(date) { Link Here
359
[% END %]
360
[% END %]
360
361
361
[% IF ( NOT_FOR_LOAN_FORCING ) %]
362
[% IF ( NOT_FOR_LOAN_FORCING ) %]
362
    <li>Item is normally not for loan.  Check out anyway?</li>
363
    <li>
364
    [% IF ( itemtype_notforloan ) %]
365
        Item type is normally not for loan.
366
    [% ELSIF ( item_notforloan ) %]
367
        [% item_notforloan_lib = KohaAuthorisedValues.GetByCode( authvalcode_notforloan, item_notforloan, 0 ) %]
368
        Item is normally not for loan [% IF (item_notforloan_lib) %]([% item_notforloan_lib %])[% END %].
369
    [% END %]
370
        Check out anyway?
371
    </li>
363
[% END %]
372
[% END %]
364
373
365
[% IF ( USERBLOCKEDOVERDUE ) %]
374
[% IF ( USERBLOCKEDOVERDUE ) %]
Lines 463-469 function validate1(date) { Link Here
463
        [% END %]
472
        [% END %]
464
473
465
        [% IF ( NOT_FOR_LOAN ) %]
474
        [% IF ( NOT_FOR_LOAN ) %]
466
            <li>Item not for loan</li>
475
            <li>
476
            [% IF ( itemtype_notforloan ) %]
477
                Item type not for loan.
478
            [% ELSIF ( item_notforloan ) %]
479
                [% item_notforloan_lib = KohaAuthorisedValues.GetByCode( authvalcode_notforloan, item_notforloan, 0 ) %]
480
                Item not for loan [% IF (item_notforloan_lib) %]([% item_notforloan_lib %])[% END %].
481
            [% END %]
482
            </li>
467
        [% END %]
483
        [% END %]
468
484
469
        [% IF ( WTHDRAWN ) %]
485
        [% IF ( WTHDRAWN ) %]
470
- 

Return to bug 9423