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 835-842 sub CanBookBeIssued { Link Here
835
    {
839
    {
836
        if(!C4::Context->preference("AllowNotForLoanOverride")){
840
        if(!C4::Context->preference("AllowNotForLoanOverride")){
837
            $issuingimpossible{NOT_FOR_LOAN} = 1;
841
            $issuingimpossible{NOT_FOR_LOAN} = 1;
842
            $issuingimpossible{item_notforloan} = $item->{'notforloan'};
838
        }else{
843
        }else{
839
            $needsconfirmation{NOT_FOR_LOAN_FORCING} = 1;
844
            $needsconfirmation{NOT_FOR_LOAN_FORCING} = 1;
845
            $needsconfirmation{item_notforloan} = $item->{'notforloan'};
840
        }
846
        }
841
    }
847
    }
842
    else {
848
    else {
Lines 850-865 sub CanBookBeIssued { Link Here
850
            if ($notforloan->{'notforloan'}) {
856
            if ($notforloan->{'notforloan'}) {
851
                if (!C4::Context->preference("AllowNotForLoanOverride")) {
857
                if (!C4::Context->preference("AllowNotForLoanOverride")) {
852
                    $issuingimpossible{NOT_FOR_LOAN} = 1;
858
                    $issuingimpossible{NOT_FOR_LOAN} = 1;
859
                    $issuingimpossible{itemtype_notforloan} = $item->{'itype'};
853
                } else {
860
                } else {
854
                    $needsconfirmation{NOT_FOR_LOAN_FORCING} = 1;
861
                    $needsconfirmation{NOT_FOR_LOAN_FORCING} = 1;
862
                    $needsconfirmation{itemtype_notforloan} = $item->{'itype'};
855
                }
863
                }
856
            }
864
            }
857
        }
865
        }
858
        elsif ($biblioitem->{'notforloan'} == 1){
866
        elsif ($biblioitem->{'notforloan'} == 1){
859
            if (!C4::Context->preference("AllowNotForLoanOverride")) {
867
            if (!C4::Context->preference("AllowNotForLoanOverride")) {
860
                $issuingimpossible{NOT_FOR_LOAN} = 1;
868
                $issuingimpossible{NOT_FOR_LOAN} = 1;
869
                $issuingimpossible{itemtype_notforloan} = $biblioitem->{'itemtype'};
861
            } else {
870
            } else {
862
                $needsconfirmation{NOT_FOR_LOAN_FORCING} = 1;
871
                $needsconfirmation{NOT_FOR_LOAN_FORCING} = 1;
872
                $needsconfirmation{itemtype_notforloan} = $biblioitem->{'itemtype'};
863
            }
873
            }
864
        }
874
        }
865
    }
875
    }
(-)a/circ/circulation.pl (+6 lines)
Lines 286-291 if ($barcode) { Link Here
286
286
287
    $template->param( alert => $alerts );
287
    $template->param( alert => $alerts );
288
288
289
    #  Get the item title for more information
290
    my $getmessageiteminfo = GetBiblioFromItemNumber(undef,$barcode);
291
    $template->param(
292
        authvalcode_notforloan => C4::Koha::GetAuthValCode('items.notforloan', $getmessageiteminfo->{'frameworkcode'}),
293
    );
294
289
    delete $question->{'DEBT'} if ($debt_confirmed);
295
    delete $question->{'DEBT'} if ($debt_confirmed);
290
    foreach my $impossible ( keys %$error ) {
296
    foreach my $impossible ( keys %$error ) {
291
        $template->param(
297
        $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 350-356 function validate1(date) { Link Here
350
[% END %]
351
[% END %]
351
352
352
[% IF ( NOT_FOR_LOAN_FORCING ) %]
353
[% IF ( NOT_FOR_LOAN_FORCING ) %]
353
    <li>Item is normally not for loan.  Check out anyway?</li>
354
    <li>
355
    [% IF ( itemtype_notforloan ) %]
356
        Item type is normally not for loan.
357
    [% ELSIF ( item_notforloan ) %]
358
        [% item_notforloan_lib = KohaAuthorisedValues.GetByCode( authvalcode_notforloan, item_notforloan, 0 ) %]
359
        Item is normally not for loan [% IF (item_notforloan_lib) %]([% item_notforloan_lib %])[% END %].
360
    [% END %]
361
        Check out anyway?
362
    </li>
354
[% END %]
363
[% END %]
355
364
356
[% IF ( USERBLOCKEDOVERDUE ) %]
365
[% IF ( USERBLOCKEDOVERDUE ) %]
Lines 454-460 function validate1(date) { Link Here
454
        [% END %]
463
        [% END %]
455
464
456
        [% IF ( NOT_FOR_LOAN ) %]
465
        [% IF ( NOT_FOR_LOAN ) %]
457
            <li>Item not for loan</li>
466
            <li>
467
            [% IF ( itemtype_notforloan ) %]
468
                Item type not for loan.
469
            [% ELSIF ( item_notforloan ) %]
470
                [% item_notforloan_lib = KohaAuthorisedValues.GetByCode( authvalcode_notforloan, item_notforloan, 0 ) %]
471
                Item not for loan [% IF (item_notforloan_lib) %]([% item_notforloan_lib %])[% END %].
472
            [% END %]
473
            </li>
458
        [% END %]
474
        [% END %]
459
475
460
        [% IF ( WTHDRAWN ) %]
476
        [% IF ( WTHDRAWN ) %]
461
- 

Return to bug 9423