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

(-)a/Koha/Schema/Result/Reserve.pm (+24 lines)
Lines 465-470 __PACKAGE__->belongs_to( Link Here
465
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
465
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
466
);
466
);
467
467
468
__PACKAGE__->belongs_to(
469
  "library",
470
  "Koha::Schema::Result::Branch",
471
  { branchcode => "branchcode" },
472
  {
473
    is_deferrable => 1,
474
    join_type     => "LEFT",
475
    on_delete     => "CASCADE",
476
    on_update     => "CASCADE",
477
  },
478
);
479
480
__PACKAGE__->belongs_to(
481
  "desk",
482
  "Koha::Schema::Result::Desk",
483
  { desk_id => "desk_id" },
484
  {
485
    is_deferrable => 1,
486
    join_type     => "LEFT",
487
    on_delete     => "SET NULL",
488
    on_update     => "CASCADE",
489
  },
490
);
491
468
__PACKAGE__->add_columns(
492
__PACKAGE__->add_columns(
469
    '+item_level_hold' => { is_boolean => 1 },
493
    '+item_level_hold' => { is_boolean => 1 },
470
    '+lowestPriority'  => { is_boolean => 1 },
494
    '+lowestPriority'  => { is_boolean => 1 },
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc (-25 / +39 lines)
Lines 70-78 Link Here
70
                    <input type="hidden" name="rank-request" class="rank-request" value="[% hold.priority | html %]" data-hold-id="[% hold.reserve_id | html %]">
70
                    <input type="hidden" name="rank-request" class="rank-request" value="[% hold.priority | html %]" data-hold-id="[% hold.reserve_id | html %]">
71
                    <select name="rank-request" class="rank-request" disabled="disabled" data-hold-id="[% hold.reserve_id | html %]">
71
                    <select name="rank-request" class="rank-request" disabled="disabled" data-hold-id="[% hold.reserve_id | html %]">
72
                    [% IF ( hold.found ) %]
72
                    [% IF ( hold.found ) %]
73
                        [% IF ( hold.intransit ) %]
73
                        [% IF ( hold.found == 'T' ) %]
74
                            <option value="T" selected="selected">In transit</option>
74
                            <option value="T" selected="selected">In transit</option>
75
                        [% ELSIF (hold.inprocessing) %]
75
                        [% ELSIF ( hold.found == 'P' ) %]
76
                            <option value="P" selected="selected">In processing</option>
76
                            <option value="P" selected="selected">In processing</option>
77
                        [% ELSE %]
77
                        [% ELSE %]
78
                            <option value="W" selected="selected">Waiting</option>
78
                            <option value="W" selected="selected">Waiting</option>
Lines 88-106 Link Here
88
                    [%- SET prev_priority  = loop.prev.priority -%]
88
                    [%- SET prev_priority  = loop.prev.priority -%]
89
                    [%- SET next_priority  = loop.next.priority -%]
89
                    [%- SET next_priority  = loop.next.priority -%]
90
                    <td style="white-space:nowrap;">
90
                    <td style="white-space:nowrap;">
91
                        <a class="hold-arrow" title="Move hold up" href="request.pl?action=move&amp;where=up&amp;first_priority=[% first_priority | html %]&amp;last_priority=[% last_priority | html %]&amp;prev_priority=[% prev_priority | html %]&amp;next_priority=[% next_priority | html %]&amp;borrowernumber=[% hold.borrowernumber | html %]&amp;biblionumber=[% hold.biblionumber | html %]&amp;reserve_id=[% hold.reserve_id | html %]&amp;date=[% hold.date | html %]">
91
                        <a class="hold-arrow" title="Move hold up" href="request.pl?action=move&amp;where=up&amp;first_priority=[% first_priority | html %]&amp;last_priority=[% last_priority | html %]&amp;prev_priority=[% prev_priority | html %]&amp;next_priority=[% next_priority | html %]&amp;borrowernumber=[% hold.borrowernumber | html %]&amp;biblionumber=[% hold.biblionumber | html %]&amp;reserve_id=[% hold.reserve_id | html %]&amp;date=[% hold.reservedate | html %]">
92
                            <i class="fa fa-lg icon-move-hold-up" aria-hidden="true"></i>
92
                            <i class="fa fa-lg icon-move-hold-up" aria-hidden="true"></i>
93
                        </a>
93
                        </a>
94
94
95
                        <a class="hold-arrow" title="Move hold to top" href="request.pl?action=move&amp;where=top&amp;first_priority=[% first_priority | html %]&amp;last_priority=[% last_priority | html %]&amp;prev_priority=[% prev_priority | html %]&amp;next_priority=[% next_priority | html %]&amp;borrowernumber=[% hold.borrowernumber | html %]&amp;biblionumber=[% hold.biblionumber | html %]&amp;reserve_id=[% hold.reserve_id | html %]&amp;date=[% hold.date | html %]">
95
                        <a class="hold-arrow" title="Move hold to top" href="request.pl?action=move&amp;where=top&amp;first_priority=[% first_priority | html %]&amp;last_priority=[% last_priority | html %]&amp;prev_priority=[% prev_priority | html %]&amp;next_priority=[% next_priority | html %]&amp;borrowernumber=[% hold.borrowernumber | html %]&amp;biblionumber=[% hold.biblionumber | html %]&amp;reserve_id=[% hold.reserve_id | html %]&amp;date=[% hold.reservedate | html %]">
96
                            <i class="fa fa-lg icon-move-hold-top" aria-hidden="true"></i>
96
                            <i class="fa fa-lg icon-move-hold-top" aria-hidden="true"></i>
97
                        </a>
97
                        </a>
98
98
99
                        <a class="hold-arrow" title="Move hold to bottom" href="request.pl?action=move&amp;where=bottom&amp;first_priority=[% first_priority | html %]&amp;last_priority=[% last_priority | html %]&amp;prev_priority=[% prev_priority | html %]&amp;next_priority=[% next_priority | html %]&amp;borrowernumber=[% hold.borrowernumber | html %]&amp;biblionumber=[% hold.biblionumber | html %]&amp;reserve_id=[% hold.reserve_id | html %]&amp;date=[% hold.date | html %]">
99
                        <a class="hold-arrow" title="Move hold to bottom" href="request.pl?action=move&amp;where=bottom&amp;first_priority=[% first_priority | html %]&amp;last_priority=[% last_priority | html %]&amp;prev_priority=[% prev_priority | html %]&amp;next_priority=[% next_priority | html %]&amp;borrowernumber=[% hold.borrowernumber | html %]&amp;biblionumber=[% hold.biblionumber | html %]&amp;reserve_id=[% hold.reserve_id | html %]&amp;date=[% hold.reservedate | html %]">
100
                            <i class="fa fa-lg icon-move-hold-bottom" aria-hidden="true"></i>
100
                            <i class="fa fa-lg icon-move-hold-bottom" aria-hidden="true"></i>
101
                        </a>
101
                        </a>
102
102
103
                        <a class="hold-arrow" title="Move hold down" href="request.pl?action=move&amp;where=down&amp;first_priority=[% first_priority | html %]&amp;last_priority=[% last_priority | html %]&amp;prev_priority=[% prev_priority | html %]&amp;next_priority=[% next_priority | html %]&amp;borrowernumber=[% hold.borrowernumber | html %]&amp;biblionumber=[% hold.biblionumber | html %]&amp;reserve_id=[% hold.reserve_id | html %]&amp;date=[% hold.date | html %]">
103
                        <a class="hold-arrow" title="Move hold down" href="request.pl?action=move&amp;where=down&amp;first_priority=[% first_priority | html %]&amp;last_priority=[% last_priority | html %]&amp;prev_priority=[% prev_priority | html %]&amp;next_priority=[% next_priority | html %]&amp;borrowernumber=[% hold.borrowernumber | html %]&amp;biblionumber=[% hold.biblionumber | html %]&amp;reserve_id=[% hold.reserve_id | html %]&amp;date=[% hold.reservedate | html %]">
104
                            <i class="fa fa-lg icon-move-hold-down" aria-hidden="true"></i>
104
                            <i class="fa fa-lg icon-move-hold-down" aria-hidden="true"></i>
105
                        </a>
105
                        </a>
106
                    </td>
106
                    </td>
Lines 111-122 Link Here
111
            <td>
111
            <td>
112
                [% INCLUDE 'patron-title.inc' patron=hold.patron hide_patron_infos_if_needed=1 %]
112
                [% INCLUDE 'patron-title.inc' patron=hold.patron hide_patron_infos_if_needed=1 %]
113
            </td>
113
            </td>
114
            <td>[% hold.notes | html | html_line_break %]</td>
114
            <td>[% hold.reservenotes | html | html_line_break %]</td>
115
            <td>
115
            <td>
116
                [% IF Koha.Preference('AllowHoldDateInFuture') %]
116
                [% IF Koha.Preference('AllowHoldDateInFuture') %]
117
                    <input type="text" class="flatpickr" value="[% hold.date | $KohaDates %]" required="required" size="10" name="reservedate" />
117
                    <input type="text" class="flatpickr" value="[% hold.reservedate | $KohaDates %]" required="required" size="10" name="reservedate" />
118
                [% ELSE %]
118
                [% ELSE %]
119
                    [% hold.date | $KohaDates %]
119
                    [% hold.reservedate | $KohaDates %]
120
                [% END %]
120
                [% END %]
121
            </td>
121
            </td>
122
            <td>
122
            <td>
Lines 124-149 Link Here
124
            </td>
124
            </td>
125
            <td>
125
            <td>
126
                [%- IF ( hold.found ) -%]
126
                [%- IF ( hold.found ) -%]
127
                    <input type="hidden" name="pickup" value="[% hold.wbrcode | html %]" />
127
                    <input type="hidden" name="pickup" value="[% hold.branchcode | html %]" />
128
                    [%- IF ( hold.atdestination ) -%]
128
                    [%- IF ( hold.found == 'W' && hold.item.holdingbranch == hold.branchcode ) -%]
129
                            Item waiting at <strong> [% hold.wbrname | html %]</strong>[% IF hold.desk_name %], [% hold.desk_name | html %],[% END %] since [% hold.waiting_date | $KohaDates %]
129
                            Item waiting at <strong> [% hold.branch.branchname | html %]</strong>[% IF hold.desk %], [% hold.desk.desk_name | html %],[% END %] since [% hold.waitingdate | $KohaDates %]
130
                    [%- ELSIF (hold.intransit) -%]
130
                    [%- ELSIF (hold.found == 'T') -%]
131
                        Item being transferred to <strong> [% hold.wbrname | html %]</strong>
131
                        Item being transferred to <strong> [% hold.branch.branchname | html %]</strong>
132
                    [%- ELSIF (hold.inprocessing) -%]
132
                    [%- ELSIF (hold.found == 'P') -%]
133
                        Item being processed at <strong> [% hold.wbrname | html %]</strong>
133
                        Item being processed at <strong> [% hold.branch.branchname | html %]</strong>
134
                    [%- ELSE -%]
134
                    [%- ELSE -%]
135
                        Hold expected at <strong>[% hold.wbrname | html %]</strong>, please checkin to verify status
135
                        Hold expected at <strong>[% hold.branch.branchname | html %]</strong>, please checkin to verify status
136
                    [%- END -%]
136
                    [%- END -%]
137
                [%- ELSE -%]
137
                [%- ELSE -%]
138
                    [%- IF Koha.Preference('IndependentBranches') && Branches.all().size == 1 -%]
138
                    [%- IF Koha.Preference('IndependentBranches') && Branches.all().size == 1 -%]
139
                        [% Branches.GetName(hold.branchcode) | html %] <input type="hidden" name="pickup" value="[% hold.branchcode | html %]" />
139
                        [% hold.branch.branchname | html %] <input type="hidden" name="pickup" value="[% hold.branchcode | html %]" />
140
                    [%- ELSE -%]
140
                    [%- ELSE -%]
141
                        <select class="pickup_location_dropdown"
141
                        <select class="pickup_location_dropdown"
142
                                data-selected="[% hold.branchcode | html %]"
142
                                data-selected="[% hold.branchcode | html %]"
143
                                data-hold-id="[% hold.reserve_id | html %]"
143
                                data-hold-id="[% hold.reserve_id | html %]"
144
                                data-pickup-location-source="hold"
144
                                data-pickup-location-source="hold"
145
                                name="pickup">
145
                                name="pickup">
146
                            <option selected="selected" value="[% hold.branchcode | html %]">[% Branches.GetName(hold.branchcode) | html %]</option>
146
                            <option selected="selected" value="[% hold.branchcode | html %]">[% hold.branch.branchname | html %]</option>
147
                            <option value="" disabled="disabled" class="loading">Loading...</option>
147
                            <option value="" disabled="disabled" class="loading">Loading...</option>
148
                        </select>
148
                        </select>
149
                        <img class="loading_[% hold.reserve_id | html %]" src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" style="display:none;"/>
149
                        <img class="loading_[% hold.reserve_id | html %]" src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" style="display:none;"/>
Lines 153-160 Link Here
153
            <td>
153
            <td>
154
                [%- IF ( hold.found ) -%]
154
                [%- IF ( hold.found ) -%]
155
                    <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% hold.biblionumber | uri %]&amp;itemnumber=[% hold.itemnumber | uri %]#item[% hold.itemnumber | uri %]">
155
                    <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% hold.biblionumber | uri %]&amp;itemnumber=[% hold.itemnumber | uri %]#item[% hold.itemnumber | uri %]">
156
                        [%- IF ( hold.barcodenumber ) -%]
156
                        [%- IF ( hold.item.barcode ) -%]
157
                            [%- hold.barcodenumber | html -%]
157
                            [%- hold.item.barcode | html -%]
158
                            <input type="hidden" name="itemnumber" value="[% hold.itemnumber | html %]" />
158
                            <input type="hidden" name="itemnumber" value="[% hold.itemnumber | html %]" />
159
                        [%- ELSE -%]
159
                        [%- ELSE -%]
160
                            <span>No barcode</span>
160
                            <span>No barcode</span>
Lines 165-172 Link Here
165
                        <em>
165
                        <em>
166
                            <span>Only item</span>
166
                            <span>Only item</span>
167
                            <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% hold.biblionumber | uri %]&amp;itemnumber=[% hold.itemnumber | uri %]#item[% hold.itemnumber | uri %]">
167
                            <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% hold.biblionumber | uri %]&amp;itemnumber=[% hold.itemnumber | uri %]#item[% hold.itemnumber | uri %]">
168
                                [%- IF ( hold.barcodenumber ) -%]
168
                                [%- IF ( hold.item.barcode ) -%]
169
                                    [%- hold.barcodenumber | html -%]
169
                                    [%- hold.item.barcode | html -%]
170
                                    <input type="hidden" name="itemnumber" value="[% hold.itemnumber | html %]" />
170
                                    <input type="hidden" name="itemnumber" value="[% hold.itemnumber | html %]" />
171
                                [%- ELSE -%]
171
                                [%- ELSE -%]
172
                                    <span>No barcode</span>
172
                                    <span>No barcode</span>
Lines 190-195 Link Here
190
            [%- IF ( CAN_user_reserveforothers_modify_holds_priority ) -%]
190
            [%- IF ( CAN_user_reserveforothers_modify_holds_priority ) -%]
191
            [%- UNLESS hold.found -%]
191
            [%- UNLESS hold.found -%]
192
                    <td>
192
                    <td>
193
<<<<<<< HEAD
193
                            [% IF ( hold.lowestPriority ) %]
194
                            [% IF ( hold.lowestPriority ) %]
194
                                <a class="hold-arrow" title="Remove lowest priority" href="request.pl?action=setLowestPriority&amp;borrowernumber=[% hold.borrowernumber | html %]&amp;biblionumber=[% hold.biblionumber | html %]&amp;reserve_id=[% hold.reserve_id | html %]&amp;date=[% hold.date | html %]">
195
                                <a class="hold-arrow" title="Remove lowest priority" href="request.pl?action=setLowestPriority&amp;borrowernumber=[% hold.borrowernumber | html %]&amp;biblionumber=[% hold.biblionumber | html %]&amp;reserve_id=[% hold.reserve_id | html %]&amp;date=[% hold.date | html %]">
195
                                    <i class="fa fa-lg fa-rotate-90 icon-unset-lowest" aria-hidden="true"></i>
196
                                    <i class="fa fa-lg fa-rotate-90 icon-unset-lowest" aria-hidden="true"></i>
Lines 197-202 Link Here
197
                                <a class="hold-arrow" title="Set lowest priority" href="request.pl?action=setLowestPriority&amp;borrowernumber=[% hold.borrowernumber | html %]&amp;biblionumber=[% hold.biblionumber | html %]&amp;reserve_id=[% hold.reserve_id | html %]&amp;date=[% hold.date | html %]">
198
                                <a class="hold-arrow" title="Set lowest priority" href="request.pl?action=setLowestPriority&amp;borrowernumber=[% hold.borrowernumber | html %]&amp;biblionumber=[% hold.biblionumber | html %]&amp;reserve_id=[% hold.reserve_id | html %]&amp;date=[% hold.date | html %]">
198
                                    <i class="fa fa-lg fa-rotate-90 icon-set-lowest" aria-hidden="true"></i>
199
                                    <i class="fa fa-lg fa-rotate-90 icon-set-lowest" aria-hidden="true"></i>
199
                            [% END %]
200
                            [% END %]
201
=======
202
                        <a title="Toggle lowest priority" href="request.pl?action=setLowestPriority&amp;borrowernumber=[% hold.borrowernumber | html %]&amp;biblionumber=[% hold.biblionumber | html %]&amp;reserve_id=[% hold.reserve_id | html %]&amp;date=[% hold.reservedate | html %]">
203
                            [%- IF ( hold.lowestPriority ) -%]
204
                                <img src="[% interface | html %]/[% theme | html %]/img/go-bottom.png" alt="Unset lowest priority" />
205
                            [%- ELSE -%]
206
                                <img src="[% interface | html %]/[% theme | html %]/img/go-down.png" alt="Set to lowest priority" />
207
                            [%- END -%]
208
>>>>>>> Bug 30269: Use objects directly on request.pl
200
                        </a>
209
                        </a>
201
                    </td>
210
                    </td>
202
        [%- ELSE -%]
211
        [%- ELSE -%]
Lines 204-211 Link Here
204
        [%- END -%]
213
        [%- END -%]
205
            [%- END -%]
214
            [%- END -%]
206
            <td>
215
            <td>
216
<<<<<<< HEAD
207
                <a class="cancel-hold" title="Cancel hold" data-borrowernumber="[% hold.borrowernumber | html %]" data-biblionumber="[% hold.biblionumber | html %]" data-id="[% hold.reserve_id | html %]" href="request.pl?action=cancel&amp;borrowernumber=[% hold.borrowernumber | html %]&amp;biblionumber=[% hold.biblionumber | html %]&amp;reserve_id=[% hold.reserve_id | html %]&amp;date=[% hold.date | html %]">
217
                <a class="cancel-hold" title="Cancel hold" data-borrowernumber="[% hold.borrowernumber | html %]" data-biblionumber="[% hold.biblionumber | html %]" data-id="[% hold.reserve_id | html %]" href="request.pl?action=cancel&amp;borrowernumber=[% hold.borrowernumber | html %]&amp;biblionumber=[% hold.biblionumber | html %]&amp;reserve_id=[% hold.reserve_id | html %]&amp;date=[% hold.date | html %]">
208
                    <i class="fa fa-trash" aria-label="Cancel hold"></i>
218
                    <i class="fa fa-trash" aria-label="Cancel hold"></i>
219
=======
220
                <a class="btn btn-default btn-xs cancel-hold" data-borrowernumber="[% hold.borrowernumber | html %]" data-biblionumber="[% hold.biblionumber | html %]" data-id="[% hold.reserve_id | html %]" href="request.pl?action=cancel&amp;borrowernumber=[% hold.borrowernumber | html %]&amp;biblionumber=[% hold.biblionumber | html %]&amp;reserve_id=[% hold.reserve_id | html %]&amp;date=[% hold.reservedate | html %]">
221
                    <i class="fa fa-trash" aria-hidden="true"></i> Cancel
222
>>>>>>> Bug 30269: Use objects directly on request.pl
209
                </a>
223
                </a>
210
            </td>
224
            </td>
211
            <td>
225
            <td>
Lines 228-237 Link Here
228
                    [%- END -%]
242
                    [%- END -%]
229
                [%- END # IF SuspendHoldsIntranet -%]
243
                [%- END # IF SuspendHoldsIntranet -%]
230
                [%- IF ( hold.found ) -%]
244
                [%- IF ( hold.found ) -%]
231
                    <input type="button" id="revert_hold_[% hold.reserve_id | html %]" value="[% IF hold.intransit %]Revert transit status[% ELSE %]Revert waiting status[% END %]" onclick="window.location.href='request.pl?action=move&amp;where=down&amp;first_priority=[% first_priority | uri %]&amp;last_priority=[% last_priority | uri %]&amp;prev_priority=0&amp;next_priority=1&amp;borrowernumber=[% hold.borrowernumber | uri %]&amp;biblionumber=[% hold.biblionumber | uri %]&amp;itemnumber=[% hold.itemnumber | uri %]&amp;reserve_id=[% hold.reserve_id | uri %]&amp;date=[% hold.date | uri %]'">
245
                    <input type="button" id="revert_hold_[% hold.reserve_id | html %]" value="[% IF hold.found == 'T' %]Revert transit status[% ELSE %]Revert waiting status[% END %]" onclick="window.location.href='request.pl?action=move&amp;where=down&amp;first_priority=[% first_priority | uri %]&amp;last_priority=[% last_priority | uri %]&amp;prev_priority=0&amp;next_priority=1&amp;borrowernumber=[% hold.borrowernumber | uri %]&amp;biblionumber=[% hold.biblionumber | uri %]&amp;itemnumber=[% hold.itemnumber | uri %]&amp;reserve_id=[% hold.reserve_id | uri %]&amp;date=[% hold.reservedate | uri %]'">
232
                [%- END -%]
246
                [%- END -%]
233
            </td>
247
            </td>
234
            [% IF ( hold.intransit || hold.atdestination ) %]
248
            [% IF ( hold.found == 'T' || ( hold.found == 'W' && hold.item.holdingbranch == hold.branchcode ) ) %]
235
                <td><input class="printholdslip" type="button" name="printholdslip" value="Print slip" data-reserve_id="[% hold.reserve_id | html %]"></td>
249
                <td><input class="printholdslip" type="button" name="printholdslip" value="Print slip" data-reserve_id="[% hold.reserve_id | html %]"></td>
236
            [% ELSE %]
250
            [% ELSE %]
237
                <td></td>
251
                <td></td>
(-)a/reserve/request.pl (-53 / +3 lines)
Lines 597-654 if ( ( $findborrower && $borrowernumber_hold || $findclub && $club_hold ) Link Here
597
        $template->param( always_show_holds => $always_show_holds );
597
        $template->param( always_show_holds => $always_show_holds );
598
        my $show_holds_now = $input->param('show_holds_now');
598
        my $show_holds_now = $input->param('show_holds_now');
599
        unless( (defined $always_show_holds && $always_show_holds eq 'DONT') && !$show_holds_now ){
599
        unless( (defined $always_show_holds && $always_show_holds eq 'DONT') && !$show_holds_now ){
600
            my @reserves = Koha::Holds->search( { biblionumber => $biblionumber }, { order_by => 'priority' } )->as_list;
600
            @reserveloop = Koha::Holds->search( { 'me.biblionumber' => $biblionumber }, {
601
            foreach my $res (
601
                prefetch => ['item','patron','library','desk'],
602
                sort {
602
                order_by => [ {-desc => 'found'},'priority'] } )->as_list;
603
                    my $a_found = $a->found() || '';
604
                    my $b_found = $a->found() || '';
605
                    $a_found cmp $b_found;
606
                } @reserves
607
              )
608
            {
609
                my %reserve;
610
                if ( $res->is_found() ) {
611
                    $reserve{'holdingbranch'} = $res->item()->holdingbranch();
612
                    $reserve{'biblionumber'}  = $res->item()->biblionumber();
613
                    $reserve{'barcodenumber'} = $res->item()->barcode();
614
                    $reserve{'wbrcode'}       = $res->branchcode();
615
                    $reserve{'itemnumber'}    = $res->itemnumber();
616
                    $reserve{'wbrname'}       = $res->branch()->branchname();
617
                    $reserve{'atdestination'} = $res->is_at_destination();
618
                    $reserve{'desk_name'}     = ( $res->desk() ) ? $res->desk()->desk_name() : '' ;
619
                    $reserve{'found'}     = $res->is_found();
620
                    $reserve{'inprocessing'} = $res->is_in_processing();
621
                    $reserve{'intransit'} = $res->is_in_transit();
622
                }
623
                elsif ( $res->priority() > 0 ) {
624
                    if ( my $item = $res->item() )  {
625
                        $reserve{'itemnumber'}      = $item->id();
626
                        $reserve{'barcodenumber'}   = $item->barcode();
627
                        $reserve{'item_level_hold'} = 1;
628
                    }
629
                }
630
631
                $reserve{'expirationdate'} = $res->expirationdate;
632
                $reserve{'date'}           = $res->reservedate;
633
                $reserve{'borrowernumber'} = $res->borrowernumber();
634
                $reserve{'biblionumber'}   = $res->biblionumber();
635
                $reserve{'patron'}         = $res->borrower;
636
                $reserve{'notes'}          = $res->reservenotes();
637
                $reserve{'waiting_date'}   = $res->waitingdate();
638
                $reserve{'ccode'}          = $res->item() ? $res->item()->ccode() : undef;
639
                $reserve{'barcode'}        = $res->item() ? $res->item()->barcode() : undef;
640
                $reserve{'priority'}       = $res->priority();
641
                $reserve{'lowestPriority'} = $res->lowestPriority();
642
                $reserve{'suspend'}        = $res->suspend();
643
                $reserve{'suspend_until'}  = $res->suspend_until();
644
                $reserve{'reserve_id'}     = $res->reserve_id();
645
                $reserve{itemtype}         = $res->itemtype();
646
                $reserve{branchcode}       = $res->branchcode();
647
                $reserve{non_priority}     = $res->non_priority();
648
                $reserve{object}           = $res;
649
650
                push( @reserveloop, \%reserve );
651
            }
652
        }
603
        }
653
604
654
        # get the time for the form name...
605
        # get the time for the form name...
655
- 

Return to bug 30269