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

(-)a/catalogue/detail.pl (-7 / +1 lines)
Lines 314-326 foreach my $item (@items) { Link Here
314
    my $item_object = Koha::Items->find( $item->{itemnumber} );
314
    my $item_object = Koha::Items->find( $item->{itemnumber} );
315
    my $holds = $item_object->current_holds;
315
    my $holds = $item_object->current_holds;
316
    if ( my $first_hold = $holds->next ) {
316
    if ( my $first_hold = $holds->next ) {
317
        my $patron = Koha::Patrons->find( $first_hold->borrowernumber );
317
        $item->{first_hold} = $first_hold;
318
        $item->{backgroundcolor} = 'reserved';
319
        $item->{reservedate}     = $first_hold->reservedate;
320
        $item->{ReservedFor}     = $patron,
321
        $item->{ExpectedAtLibrary}      = $first_hold->branchcode;
322
        # Check waiting status
323
        $item->{waitingdate} = $first_hold->waitingdate;
324
    }
318
    }
325
319
326
    if ( my $checkout = $item_object->checkout ) {
320
    if ( my $checkout = $item_object->checkout ) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-7 / +7 lines)
Lines 355-372 Link Here
355
                            [% END %]
355
                            [% END %]
356
                        [% END %]
356
                        [% END %]
357
357
358
                        [% IF ( item.reservedate ) %]
358
                        [% SET hold = item.first_hold %]
359
                            [% IF ( item.waitingdate ) %]
359
                        [% IF hold %]
360
                                Waiting at [% Branches.GetName( item.ExpectedAtLibrary ) | html %] since [% item.waitingdate | $KohaDates %].
360
                            [% IF hold.waitingdate %]
361
                                Waiting at [% Branches.GetName( hold.branchcode ) | html %] since [% hold.waitingdate | $KohaDates %].
361
                            [% ELSE %]
362
                            [% ELSE %]
362
                                Item-level hold (placed [% item.reservedate | $KohaDates %]) for delivery at [% Branches.GetName( item.ExpectedAtLibrary ) | html %].
363
                                Item-level hold (placed [% hold.reservedate | $KohaDates %]) for delivery at [% Branches.GetName( hold.branchcode ) | html %].
363
                            [% END %]
364
                            [% END %]
364
                            [% IF ( canreservefromotherbranches ) %]
365
                            [% IF ( canreservefromotherbranches ) %]
365
                                Hold for:
366
                                Hold for:
366
                                [% INCLUDE 'patron-title.inc' patron=item.ReservedFor hide_patron_infos_if_needed=1 %]
367
                                [% INCLUDE 'patron-title.inc' patron=hold.borrower hide_patron_infos_if_needed=1 %]
367
                            [% END %]
368
                            [% END %]
368
                        [% END %]
369
                        [% END %]
369
                        [% UNLESS ( item.itemnotforloan || item.notforloan_per_itemtype || item.onloan || item.itemlost || item.withdrawn || item.damaged || item.transfertwhen || item.reservedate ) %]
370
                        [% UNLESS ( item.itemnotforloan || item.notforloan_per_itemtype || item.onloan || item.itemlost || item.withdrawn || item.damaged || item.transfertwhen || hold ) %]
370
                            Available
371
                            Available
371
                        [% END %]
372
                        [% END %]
372
373
373
- 

Return to bug 20948