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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-1 / +13 lines)
Lines 211-217 Link Here
211
        <li>
211
        <li>
212
            <label for="pickup">Pickup at:</label>
212
            <label for="pickup">Pickup at:</label>
213
            <select name="pickup" size="1" id="pickup">
213
            <select name="pickup" size="1" id="pickup">
214
                [% PROCESS options_for_libraries libraries => Branches.all({ selected => pickup, search_params => { pickup_location => 1 } }) %]
214
                [% UNLESS ( multi_hold ) %]
215
                    [% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => biblionumber, patron => patron }, selected => pickup }) %]
216
                [% ELSE %]
217
                    [% PROCESS options_for_libraries libraries => Branches.all({ selected => pickup, search_params => { pickup_location => 1 } }) %]
218
                [% END %]
215
            </select>
219
            </select>
216
        </li>
220
        </li>
217
221
Lines 314-319 Link Here
314
                    <th>Vol no.</th>
318
                    <th>Vol no.</th>
315
                [% END %]
319
                [% END %]
316
                    <th class="title-string">Information</th>
320
                    <th class="title-string">Information</th>
321
                    <th class="title-string">Allowed pickup locations</th>
317
                </tr>
322
                </tr>
318
            </thead>
323
            </thead>
319
            <tbody>
324
            <tbody>
Lines 350-359 Link Here
350
                                Not holdable
355
                                Not holdable
351
                            [% ELSIF itemloo.not_holdable == 'cannotReserveFromOtherBranches' %]
356
                            [% ELSIF itemloo.not_holdable == 'cannotReserveFromOtherBranches' %]
352
                                Patron is from different library
357
                                Patron is from different library
358
                            [% ELSIF itemloo.not_holdable == 'branchNotInHoldGroup' %]
359
                                Cannot place hold from patrons's library
353
                            [% ELSIF itemloo.not_holdable == 'itemAlreadyOnHold' %]
360
                            [% ELSIF itemloo.not_holdable == 'itemAlreadyOnHold' %]
354
                                Patron already has hold for this item
361
                                Patron already has hold for this item
355
                            [% ELSIF itemloo.not_holdable == 'cannotBeTransferred' %]
362
                            [% ELSIF itemloo.not_holdable == 'cannotBeTransferred' %]
356
                                Cannot be transferred to pickup library
363
                                Cannot be transferred to pickup library
364
                            [% ELSIF itemloo.not_holdable == 'pickupNotInHoldGroup' %]
365
                                Pickup library is not in hold group
357
                            [% ELSE %]
366
                            [% ELSE %]
358
                                [% itemloo.not_holdable | html %]
367
                                [% itemloo.not_holdable | html %]
359
                            [% END %]
368
                            [% END %]
Lines 437-442 Link Here
437
                    <br />Damaged
446
                    <br />Damaged
438
                [% END %]
447
                [% END %]
439
                    </td>
448
                    </td>
449
                    <td>
450
                    [% itemloo.pickup_locations | html %]
451
                    </td>
440
                </tr>
452
                </tr>
441
            [% END %] <!--UNLESS item hide-->
453
            [% END %] <!--UNLESS item hide-->
442
            [% END %] <!-- itemloop -->
454
            [% END %] <!-- itemloop -->
(-)a/reserve/request.pl (-3 / +7 lines)
Lines 227-233 foreach my $biblionumber (@biblionumbers) { Link Here
227
    my $force_hold_level;
227
    my $force_hold_level;
228
    if ( $patron ) {
228
    if ( $patron ) {
229
        { # CanBookBeReserved
229
        { # CanBookBeReserved
230
            my $canReserve = CanBookBeReserved( $patron->borrowernumber, $biblionumber, $pickup );
230
            my $canReserve = CanBookBeReserved( $patron->borrowernumber, $biblionumber );
231
            if ( $canReserve->{status} eq 'OK' ) {
231
            if ( $canReserve->{status} eq 'OK' ) {
232
232
233
                #All is OK and we can continue
233
                #All is OK and we can continue
Lines 489-495 foreach my $biblionumber (@biblionumbers) { Link Here
489
489
490
                $item->{'holdallowed'} = $branchitemrule->{'holdallowed'};
490
                $item->{'holdallowed'} = $branchitemrule->{'holdallowed'};
491
491
492
                my $can_item_be_reserved = CanItemBeReserved( $patron->borrowernumber, $itemnumber, $pickup );
492
                my $can_item_be_reserved = CanItemBeReserved( $patron->borrowernumber, $itemnumber );
493
                $item->{not_holdable} = $can_item_be_reserved->{status} unless ( $can_item_be_reserved->{status} eq 'OK' );
493
                $item->{not_holdable} = $can_item_be_reserved->{status} unless ( $can_item_be_reserved->{status} eq 'OK' );
494
494
495
                $item->{item_level_holds} = Koha::IssuingRules->get_opacitemholds_policy( { item => $item_object, patron => $patron } );
495
                $item->{item_level_holds} = Koha::IssuingRules->get_opacitemholds_policy( { item => $item_object, patron => $patron } );
Lines 503-508 foreach my $biblionumber (@biblionumbers) { Link Here
503
                {
503
                {
504
                    $item->{available} = 1;
504
                    $item->{available} = 1;
505
                    $num_available++;
505
                    $num_available++;
506
                    if($branchitemrule->{'hold_fulfillment_policy'} eq 'any' ) {
507
                        $item->{pickup_locations} = 'Any library';
508
                    } else {
509
                        $item->{pickup_locations} = join (', ', map { $_->{branchname} } Koha::Items->find($itemnumber)->pickup_locations());
510
                    }
506
511
507
                    push( @available_itemtypes, $item->{itype} );
512
                    push( @available_itemtypes, $item->{itype} );
508
                }
513
                }
509
- 

Return to bug 22284