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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-2 / +2 lines)
Lines 782-788 Link Here
782
                                                    [% END # /IF force_hold_level %]
782
                                                    [% END # /IF force_hold_level %]
783
                                                </td>
783
                                                </td>
784
                                                <td>
784
                                                <td>
785
                                                [% IF (itemloo.pickup_locations_count > 0) %]
785
                                                [% IF (itemloo.pickup_locations_count > 0) || Koha.Preference('AllowHoldPolicyOverride') %]
786
                                                    <select name="item_pickup_[% itemloo.itemnumber | html %]" class="pickup_locations" style="width:100%;"
786
                                                    <select name="item_pickup_[% itemloo.itemnumber | html %]" class="pickup_locations" style="width:100%;"
787
                                                            data-item-id="[% itemloo.itemnumber | html %]"
787
                                                            data-item-id="[% itemloo.itemnumber | html %]"
788
                                                            data-patron-id="[% patron.borrowernumber | html %]"
788
                                                            data-patron-id="[% patron.borrowernumber | html %]"
Lines 1522-1528 Link Here
1522
                    msg = (_("- Please select an item to place a hold") + "\n");
1522
                    msg = (_("- Please select an item to place a hold") + "\n");
1523
                }
1523
                }
1524
            } else {
1524
            } else {
1525
                if( $("#pickup").length < 1 || $("#pickup").val() == "" ){
1525
                if( $("#pickup").length < 1 || $("#pickup").val() == "" || $('#pickup').val() === null ){
1526
                    msg = _("- Please select a pickup location for this hold" + "\n");
1526
                    msg = _("- Please select a pickup location for this hold" + "\n");
1527
                }
1527
                }
1528
            }
1528
            }
(-)a/reserve/request.pl (-3 / +2 lines)
Lines 511-517 if ( ( $findborrower && $borrowernumber_hold || $findclub && $club_hold ) Link Here
511
                        # Send the pickup locations count to the UI, the pickup locations will be pulled using the API
511
                        # Send the pickup locations count to the UI, the pickup locations will be pulled using the API
512
                        my $pickup_locations = $item_object->pickup_locations({ patron => $patron });
512
                        my $pickup_locations = $item_object->pickup_locations({ patron => $patron });
513
                        $item->{pickup_locations_count} = $pickup_locations->count;
513
                        $item->{pickup_locations_count} = $pickup_locations->count;
514
                        if ( $item->{pickup_locations_count} > 0 ) {
514
                        if ( $item->{pickup_locations_count} > 0 || C4::Context->preference('AllowHoldPolicyOverride') ) {
515
                            $num_items_available++;
515
                            $num_items_available++;
516
                            $item->{available} = 1;
516
                            $item->{available} = 1;
517
                            # pass the holding branch for use as default
517
                            # pass the holding branch for use as default
Lines 533-539 if ( ( $findborrower && $borrowernumber_hold || $findclub && $club_hold ) Link Here
533
                            my @pickup_locations = $item_object->pickup_locations({ patron => $patron })->as_list;
533
                            my @pickup_locations = $item_object->pickup_locations({ patron => $patron })->as_list;
534
                            $item->{pickup_locations_count} = scalar @pickup_locations;
534
                            $item->{pickup_locations_count} = scalar @pickup_locations;
535
535
536
                            if ( @pickup_locations ) {
536
                            if ( @pickup_locations || C4::Context->preference('AllowHoldPolicyOverride') ) {
537
                                $num_items_available++;
537
                                $num_items_available++;
538
                                $item->{override} = 1;
538
                                $item->{override} = 1;
539
539
540
- 

Return to bug 35573