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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-1 / +11 lines)
Lines 424-430 Link Here
424
                            <li>
424
                            <li>
425
                                <label for="pickup">Pickup at:</label>
425
                                <label for="pickup">Pickup at:</label>
426
                                <select name="pickup" size="1" id="pickup">
426
                                <select name="pickup" size="1" id="pickup">
427
                                    [% PROCESS options_for_libraries libraries => Branches.all({ selected => pickup, search_params => { pickup_location => 1 } }) %]
427
                                    [% UNLESS ( multi_hold ) %]
428
				        [% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => biblionumber, patron => patron }, selected => pickup }) %]
429
				    [% ELSE %]
430
				        [% PROCESS options_for_libraries libraries => Branches.all({ selected => pickup, search_params => { pickup_location => 1 } }) %]
431
				    [% END %]
428
                                </select>
432
                                </select>
429
                            </li>
433
                            </li>
430
434
Lines 540-545 Link Here
540
                                                <th>Vol no.</th>
544
                                                <th>Vol no.</th>
541
                                            [% END %]
545
                                            [% END %]
542
                                            <th class="title-string">Information</th>
546
                                            <th class="title-string">Information</th>
547
					    <th class="title-string">Allowed pickup locations</th>
543
                                        </tr>
548
                                        </tr>
544
                                    </thead>
549
                                    </thead>
545
                                    <tbody>
550
                                    <tbody>
Lines 576-581 Link Here
576
                                                                        Not holdable
581
                                                                        Not holdable
577
                                                                    [% ELSIF itemloo.not_holdable == 'cannotReserveFromOtherBranches' %]
582
                                                                    [% ELSIF itemloo.not_holdable == 'cannotReserveFromOtherBranches' %]
578
                                                                        Patron is from different library
583
                                                                        Patron is from different library
584
								    [% ELSIF itemloo.not_holdable == 'branchNotInHoldGroup' %]
585
									Cannot place hold from patrons's library
579
                                                                    [% ELSIF itemloo.not_holdable == 'itemAlreadyOnHold' %]
586
                                                                    [% ELSIF itemloo.not_holdable == 'itemAlreadyOnHold' %]
580
                                                                        Patron already has hold for this item
587
                                                                        Patron already has hold for this item
581
                                                                    [% ELSIF itemloo.not_holdable == 'cannotBeTransferred' %]
588
                                                                    [% ELSIF itemloo.not_holdable == 'cannotBeTransferred' %]
Lines 673-678 Link Here
673
                                                           <span class="nfl">Not for loan ([% AuthorisedValues.GetByCode( 'NOT_LOAN', itemloo.notforloan ) | html %])</span>
680
                                                           <span class="nfl">Not for loan ([% AuthorisedValues.GetByCode( 'NOT_LOAN', itemloo.notforloan ) | html %])</span>
674
                                                        [% END %]
681
                                                        [% END %]
675
                                                    </td>
682
                                                    </td>
683
						    <td>
684
						        [% itemloo.pickup_locations | html %]
685
						    </td>
676
                                                </tr>
686
                                                </tr>
677
                                            [% END # / UNLESS itemloo.hide %]
687
                                            [% END # / UNLESS itemloo.hide %]
678
                                        [% END # /FOREACH itemloo %]
688
                                        [% END # /FOREACH itemloo %]
(-)a/reserve/request.pl (-4 / +8 lines)
Lines 298-304 foreach my $biblionumber (@biblionumbers) { Link Here
298
    my $force_hold_level;
298
    my $force_hold_level;
299
    if ( $patron ) {
299
    if ( $patron ) {
300
        { # CanBookBeReserved
300
        { # CanBookBeReserved
301
            my $canReserve = CanBookBeReserved( $patron->borrowernumber, $biblionumber, $pickup );
301
            my $canReserve = CanBookBeReserved( $patron->borrowernumber, $biblionumber );
302
            if ( $canReserve->{status} eq 'OK' ) {
302
            if ( $canReserve->{status} eq 'OK' ) {
303
303
304
                #All is OK and we can continue
304
                #All is OK and we can continue
Lines 548-555 foreach my $biblionumber (@biblionumbers) { Link Here
548
548
549
                $item->{'holdallowed'} = $branchitemrule->{'holdallowed'};
549
                $item->{'holdallowed'} = $branchitemrule->{'holdallowed'};
550
550
551
                my $can_item_be_reserved = CanItemBeReserved( $patron->borrowernumber, $itemnumber, $pickup )->{status};
551
                my $can_item_be_reserved = CanItemBeReserved( $patron->borrowernumber, $itemnumber )->{status};
552
                $item->{not_holdable} = $can_item_be_reserved unless $can_item_be_reserved eq 'OK';
552
                $item->{not_holdable} = $can_item_be_reserved unless ( $can_item_be_reserved->{status} eq 'OK' );
553
553
554
                $item->{item_level_holds} = Koha::IssuingRules->get_opacitemholds_policy( { item => $item_object, patron => $patron } );
554
                $item->{item_level_holds} = Koha::IssuingRules->get_opacitemholds_policy( { item => $item_object, patron => $patron } );
555
555
Lines 562-567 foreach my $biblionumber (@biblionumbers) { Link Here
562
                {
562
                {
563
                    $item->{available} = 1;
563
                    $item->{available} = 1;
564
                    $num_available++;
564
                    $num_available++;
565
                    if($branchitemrule->{'hold_fulfillment_policy'} eq 'any' ) {
566
                        $item->{pickup_locations} = 'Any library';
567
                    } else {
568
                        $item->{pickup_locations} = join (', ', map { $_->{branchname} } Koha::Items->find($itemnumber)->pickup_locations());
569
                    }
565
570
566
                    push( @available_itemtypes, $item->{itype} );
571
                    push( @available_itemtypes, $item->{itype} );
567
                }
572
                }
568
- 

Return to bug 22284