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

(-)a/circ/circulation.pl (-13 / +13 lines)
Lines 48-53 use Koha::Patron::Debarments qw(GetDebarments); Link Here
48
use Koha::DateUtils;
48
use Koha::DateUtils;
49
use Koha::Database;
49
use Koha::Database;
50
use Koha::BiblioFrameworks;
50
use Koha::BiblioFrameworks;
51
use Koha::Items;
51
use Koha::Patron::Messages;
52
use Koha::Patron::Messages;
52
use Koha::Patron::Images;
53
use Koha::Patron::Images;
53
use Koha::SearchEngine;
54
use Koha::SearchEngine;
Lines 328-337 if (@$barcodes) { Link Here
328
    $template_params->{alert} = $alerts;
329
    $template_params->{alert} = $alerts;
329
    $template_params->{messages} = $messages;
330
    $template_params->{messages} = $messages;
330
331
331
    #  Get the item title for more information
332
    my $item = Koha::Items->find({ barcode => $barcode });
332
    my $getmessageiteminfo = GetBiblioFromItemNumber(undef,$barcode);
333
    my $biblio = $item->biblio;
333
334
334
    my $mss = Koha::MarcSubfieldStructures->search({ frameworkcode => $getmessageiteminfo->{frameworkcode}, kohafield => 'items.notforloan', authorised_value => { not => undef } });
335
    my $mss = Koha::MarcSubfieldStructures->search({ frameworkcode => $biblio->frameworkcode, kohafield => 'items.notforloan', authorised_value => { not => undef } });
335
    $template_params->{authvalcode_notforloan} = $mss->count ? $mss->next->authorised_value : undef;
336
    $template_params->{authvalcode_notforloan} = $mss->count ? $mss->next->authorised_value : undef;
336
337
337
    # Fix for bug 7494: optional checkout-time fallback search for a book
338
    # Fix for bug 7494: optional checkout-time fallback search for a book
Lines 375-396 if (@$barcodes) { Link Here
375
            $blocker = 1;
376
            $blocker = 1;
376
        }
377
        }
377
    }
378
    }
378
    my $iteminfo = GetBiblioFromItemNumber(undef, $barcode);
379
    if( !$blocker || $force_allow_issue ){
379
    if( !$blocker || $force_allow_issue ){
380
        my $confirm_required = 0;
380
        my $confirm_required = 0;
381
        unless($issueconfirmed){
381
        unless($issueconfirmed){
382
            #  Get the item title for more information
382
            #  Get the item title for more information
383
            my $materials = $iteminfo->{'materials'};
383
            my $materials = $item->materials;
384
            my $descriptions = Koha::AuthorisedValues->get_description_by_koha_field({ frameworkcode => $getmessageiteminfo->{frameworkcode}, kohafield => 'items.materials', authorised_value => $materials });
384
            my $descriptions = Koha::AuthorisedValues->get_description_by_koha_field({ frameworkcode => $biblio->frameworkcode, kohafield => 'items.materials', authorised_value => $materials });
385
            $materials = $descriptions->{lib} // '';
385
            $materials = $descriptions->{lib} // '';
386
            $template_params->{additional_materials} = $materials;
386
            $template_params->{additional_materials} = $materials;
387
            $template_params->{itemhomebranch} = $iteminfo->{'homebranch'};
387
            $template_params->{itemhomebranch} = $item->homebranch;
388
388
389
            # pass needsconfirmation to template if issuing is possible and user hasn't yet confirmed.
389
            # pass needsconfirmation to template if issuing is possible and user hasn't yet confirmed.
390
            foreach my $needsconfirmation ( keys %$question ) {
390
            foreach my $needsconfirmation ( keys %$question ) {
391
                $template_params->{$needsconfirmation} = $$question{$needsconfirmation};
391
                $template_params->{$needsconfirmation} = $$question{$needsconfirmation};
392
                $template_params->{getTitleMessageIteminfo} = $iteminfo->{'title'};
392
                $template_params->{getTitleMessageIteminfo} = $biblio->title;
393
                $template_params->{getBarcodeMessageIteminfo} = $iteminfo->{'barcode'};
393
                $template_params->{getBarcodeMessageIteminfo} = $item->barcode;
394
                $template_params->{NEEDSCONFIRMATION} = 1;
394
                $template_params->{NEEDSCONFIRMATION} = 1;
395
                $template_params->{onsite_checkout} = $onsite_checkout;
395
                $template_params->{onsite_checkout} = $onsite_checkout;
396
                $confirm_required = 1;
396
                $confirm_required = 1;
Lines 412-418 if (@$barcodes) { Link Here
412
    }
412
    }
413
413
414
    $template->param(
414
    $template->param(
415
        itembiblionumber => $getmessageiteminfo->{'biblionumber'}
415
        itembiblionumber => $biblio->biblionumber
416
    );
416
    );
417
417
418
418
Lines 420-428 if (@$barcodes) { Link Here
420
    $patron = Koha::Patrons->find( $borrowernumber );
420
    $patron = Koha::Patrons->find( $borrowernumber );
421
    $template_params->{issuecount} = $patron->checkouts->count;
421
    $template_params->{issuecount} = $patron->checkouts->count;
422
422
423
    if ( $iteminfo ) {
423
    if ( $item ) {
424
        $iteminfo->{subtitle} = GetRecordValue('subtitle', GetMarcBiblio($iteminfo->{biblionumber}), GetFrameworkCode($iteminfo->{biblionumber}));
424
        $template_params->{item} = $item;
425
        $template_params->{item} = $iteminfo;
425
        $template_params->{biblio} = $biblio;
426
    }
426
    }
427
    push @$checkout_infos, $template_params;
427
    push @$checkout_infos, $template_params;
428
  }
428
  }
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-1 / +1 lines)
Lines 283-289 $(document).ready(function() { Link Here
283
[% END %]
283
[% END %]
284
284
285
[% IF PREVISSUE %]
285
[% IF PREVISSUE %]
286
    <li>Patron has previously checked out this title: <b>[% item.title %] [% IF item.author %] by [% item.author %][% END %]</b>. Check out anyway?</li>
286
    <li>Patron has previously checked out this title: <b>[% biblio.title %] [% IF biblio.author %] by [% biblio.author %][% END %]</b>. Check out anyway?</li>
287
[% END %]
287
[% END %]
288
288
289
[% IF BIBLIO_ALREADY_ISSUED %]
289
[% IF BIBLIO_ALREADY_ISSUED %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt (-2 / +1 lines)
Lines 137-143 $(document).ready(function() { Link Here
137
            [% END %]
137
            [% END %]
138
            <td>[% checkout_info.barcode %]</td>
138
            <td>[% checkout_info.barcode %]</td>
139
            <td>
139
            <td>
140
              <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% checkout_info.item.biblionumber %]&amp;type=intra"><strong>[% checkout_info.item.title |html %][% FOREACH subtitl IN checkout_info.item.subtitle %] [% subtitl.subfield %][% END %]</strong></a>[% IF checkout_info.item.author %], by [% checkout_info.item.author %][% END %][% IF ( checkout_info.itme.itemnotes ) %]- <span class="circ-hlt">[% checkout_info.item.itemnotes %]</span>[% END %] <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% checkout_info.item.biblionumber %]&amp;itemnumber=[% checkout_info.item.itemnumber %]#item[% checkout_info.item.itemnumber %]">[% checkout_info.item.barcode %]</a>
140
              <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% checkout_info.biblio.biblionumber %]&amp;type=intra"><strong>[% checkout_info.biblio.title |html %][% FOREACH subtitle IN checkout_info.biblio.subtitles %] [% subtitle.subfield %][% END %]</strong></a>[% IF checkout_info.biblio.author %], by [% checkout_info.biblio.author %][% END %][% IF ( checkout_info.item.itemnotes ) %]- <span class="circ-hlt">[% checkout_info.item.itemnotes %]</span>[% END %] <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% checkout_info.biblio.biblionumber %]&amp;itemnumber=[% checkout_info.item.itemnumber %]#item[% checkout_info.item.itemnumber %]">[% checkout_info.item.barcode %]</a>
141
            </td>
141
            </td>
142
            <td>
142
            <td>
143
              [% IF checkout_info.NEEDSCONFIRMATION %]
143
              [% IF checkout_info.NEEDSCONFIRMATION %]
144
- 

Return to bug 18276