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 745-751 Link Here
745
                                                    [% END # /IF force_hold_level %]
745
                                                    [% END # /IF force_hold_level %]
746
                                                </td>
746
                                                </td>
747
                                                <td>
747
                                                <td>
748
                                                [% IF (itemloo.pickup_locations_count > 0) %]
748
                                                [% IF (itemloo.pickup_locations_count > 0) || Koha.Preference('AllowHoldPolicyOverride') %]
749
                                                    <select name="item_pickup_[% itemloo.itemnumber | html %]" class="pickup_locations" style="width:100%;"
749
                                                    <select name="item_pickup_[% itemloo.itemnumber | html %]" class="pickup_locations" style="width:100%;"
750
                                                            data-item-id="[% itemloo.itemnumber | html %]"
750
                                                            data-item-id="[% itemloo.itemnumber | html %]"
751
                                                            data-patron-id="[% patron.borrowernumber | html %]"
751
                                                            data-patron-id="[% patron.borrowernumber | html %]"
Lines 1457-1463 Link Here
1457
                    msg = (_("- Please select an item to place a hold") + "\n");
1457
                    msg = (_("- Please select an item to place a hold") + "\n");
1458
                }
1458
                }
1459
            } else {
1459
            } else {
1460
                if( $("#pickup").length < 1 || $("#pickup").val() == "" ){
1460
                if( $("#pickup").length < 1 || $("#pickup").val() == "" || $('#pickup').val() === null ){
1461
                    msg = _("- Please select a pickup location for this hold" + "\n");
1461
                    msg = _("- Please select a pickup location for this hold" + "\n");
1462
                }
1462
                }
1463
            }
1463
            }
(-)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 30687