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

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

Return to bug 18276