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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-2 / +2 lines)
Lines 799-805 Link Here
799
                                                    [% END # /IF force_hold_level %]
799
                                                    [% END # /IF force_hold_level %]
800
                                                </td>
800
                                                </td>
801
                                                <td>
801
                                                <td>
802
                                                [% IF (itemloo.pickup_locations_count > 0) || itemloo.override %]
802
                                                [% IF (itemloo.pickup_locations_count > 0) || itemloo.override || Koha.Preference('AllowHoldPolicyOverride') %]
803
                                                    <select name="item_pickup_[% itemloo.itemnumber | html %]" class="pickup_locations" style="width:100%;"
803
                                                    <select name="item_pickup_[% itemloo.itemnumber | html %]" class="pickup_locations" style="width:100%;"
804
                                                            data-item-id="[% itemloo.itemnumber | html %]"
804
                                                            data-item-id="[% itemloo.itemnumber | html %]"
805
                                                            data-patron-id="[% patron.borrowernumber | html %]"
805
                                                            data-patron-id="[% patron.borrowernumber | html %]"
Lines 1518-1524 Link Here
1518
                    msg = (_("- Please select an item to place a hold") + "\n");
1518
                    msg = (_("- Please select an item to place a hold") + "\n");
1519
                }
1519
                }
1520
            } else {
1520
            } else {
1521
                if( $("#pickup").length < 1 || $("#pickup").val() == "" ){
1521
                if( $("#pickup").length < 1 || $("#pickup").val() == "" || $('#pickup').val() === null ){
1522
                    msg = _("- Please select a pickup location for this hold" + "\n");
1522
                    msg = _("- Please select a pickup location for this hold" + "\n");
1523
                }
1523
                }
1524
            }
1524
            }
(-)a/reserve/request.pl (-3 / +2 lines)
Lines 515-521 if ( ( $findborrower && $borrowernumber_hold || $findclub && $club_hold ) Link Here
515
                        # Send the pickup locations count to the UI, the pickup locations will be pulled using the API
515
                        # Send the pickup locations count to the UI, the pickup locations will be pulled using the API
516
                        my $pickup_locations = $item_object->pickup_locations({ patron => $patron });
516
                        my $pickup_locations = $item_object->pickup_locations({ patron => $patron });
517
                        $item->{pickup_locations_count} = $pickup_locations->count;
517
                        $item->{pickup_locations_count} = $pickup_locations->count;
518
                        if ( $item->{pickup_locations_count} > 0 ) {
518
                        if ( $item->{pickup_locations_count} > 0 || C4::Context->preference('AllowHoldPolicyOverride') ) {
519
                            $num_items_available++;
519
                            $num_items_available++;
520
                            $item->{available} = 1;
520
                            $item->{available} = 1;
521
                            # pass the holding branch for use as default
521
                            # pass the holding branch for use as default
Lines 537-543 if ( ( $findborrower && $borrowernumber_hold || $findclub && $club_hold ) Link Here
537
                            my @pickup_locations = $item_object->pickup_locations({ patron => $patron })->as_list;
537
                            my @pickup_locations = $item_object->pickup_locations({ patron => $patron })->as_list;
538
                            $item->{pickup_locations_count} = scalar @pickup_locations;
538
                            $item->{pickup_locations_count} = scalar @pickup_locations;
539
539
540
                            if ( @pickup_locations ) {
540
                            if ( @pickup_locations || C4::Context->preference('AllowHoldPolicyOverride') ) {
541
                                $num_items_available++;
541
                                $num_items_available++;
542
                                $item->{override} = 1;
542
                                $item->{override} = 1;
543
543
544
- 

Return to bug 30687