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

(-)a/C4/HoldsQueue.pm (-1 / +17 lines)
Lines 133-139 sub GetHoldsQueueItems { Link Here
133
    my $dbh   = C4::Context->dbh;
133
    my $dbh   = C4::Context->dbh;
134
134
135
    my @bind_params = ();
135
    my @bind_params = ();
136
    my $query = q/SELECT tmp_holdsqueue.*, biblio.author, items.ccode, items.itype, biblioitems.itemtype, items.location,
136
    my $query = q/SELECT borrowers.surname,
137
                         borrowers.othernames,
138
                         borrowers.firstname,
139
                         borrowers.cardnumber,
140
                         borrowers.borrowernumber,
141
                         borrowers.title AS borrower_title,
142
                         tmp_holdsqueue.*, biblio.author, items.ccode, items.itype, biblioitems.itemtype, items.location,
137
                         items.enumchron, items.cn_sort, biblioitems.publishercode,
143
                         items.enumchron, items.cn_sort, biblioitems.publishercode,
138
                         biblio.copyrightdate, biblio.subtitle, biblio.medium,
144
                         biblio.copyrightdate, biblio.subtitle, biblio.medium,
139
                         biblio.part_number, biblio.part_name,
145
                         biblio.part_number, biblio.part_name,
Lines 143-148 sub GetHoldsQueueItems { Link Here
143
                       JOIN biblio      USING (biblionumber)
149
                       JOIN biblio      USING (biblionumber)
144
                  LEFT JOIN biblioitems USING (biblionumber)
150
                  LEFT JOIN biblioitems USING (biblionumber)
145
                  LEFT JOIN items       USING (  itemnumber)
151
                  LEFT JOIN items       USING (  itemnumber)
152
                  LEFT JOIN borrowers   USING (borrowernumber)
146
                /;
153
                /;
147
    if ($branchlimit) {
154
    if ($branchlimit) {
148
        $query .=" WHERE tmp_holdsqueue.holdingbranch = ?";
155
        $query .=" WHERE tmp_holdsqueue.holdingbranch = ?";
Lines 159-164 sub GetHoldsQueueItems { Link Here
159
        }
166
        }
160
        delete $row->{itemtype};
167
        delete $row->{itemtype};
161
168
169
        $row->{borrower} = {
170
            borrowernumber => $row->{borrowernumber},
171
            cardnumber     => $row->{cardnumber},
172
            firstname      => $row->{firstname},
173
            othernames     => $row->{othernames},
174
            surname        => $row->{surname},
175
            title          => $row->{borrower_title},
176
        };
177
162
        push @$items, $row;
178
        push @$items, $row;
163
    }
179
    }
164
    return $items;
180
    return $items;
(-)a/circ/view_holdsqueue.pl (-3 lines)
Lines 48-56 my $itemtypeslimit = $params->{'itemtypeslimit'}; Link Here
48
if ( $run_report ) {
48
if ( $run_report ) {
49
    # XXX GetHoldsQueueItems() does not support $itemtypeslimit!
49
    # XXX GetHoldsQueueItems() does not support $itemtypeslimit!
50
    my $items = GetHoldsQueueItems($branchlimit, $itemtypeslimit);
50
    my $items = GetHoldsQueueItems($branchlimit, $itemtypeslimit);
51
    for my $item ( @$items ) {
52
        $item->{patron} = Koha::Patrons->find( $item->{borrowernumber} );
53
    }
54
    $template->param(
51
    $template->param(
55
        branchlimit     => $branchlimit,
52
        branchlimit     => $branchlimit,
56
        total      => scalar @$items,
53
        total      => scalar @$items,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt (-2 / +1 lines)
Lines 184-190 Link Here
184
            </td>
184
            </td>
185
            <td class="hq-patron">
185
            <td class="hq-patron">
186
              <p>
186
              <p>
187
                  [% INCLUDE 'patron-title.inc' invert_name=1 patron=itemsloo.patron hide_patron_infos_if_needed=1 link_to="circulation_reserves" %]
187
                  [% INCLUDE 'patron-title.inc' invert_name=1 borrower=itemsloo.borrower hide_patron_infos_if_needed=0 link_to="circulation_reserves" %]
188
              </p>
188
              </p>
189
              [% UNLESS Koha.Preference('HidePatronName') %]
189
              [% UNLESS Koha.Preference('HidePatronName') %]
190
                 <p>[% itemsloo.patron.phone | html %]</p>
190
                 <p>[% itemsloo.patron.phone | html %]</p>
191
- 

Return to bug 28966