Lines 136-142
sub GetHoldsQueueItems {
Link Here
|
136 |
my $dbh = C4::Context->dbh; |
136 |
my $dbh = C4::Context->dbh; |
137 |
|
137 |
|
138 |
my @bind_params = (); |
138 |
my @bind_params = (); |
139 |
my $query = q/SELECT tmp_holdsqueue.*, biblio.author, items.ccode, items.itype, biblioitems.itemtype, items.location, |
139 |
my $query = q/SELECT borrowers.surname, |
|
|
140 |
borrowers.othernames, |
141 |
borrowers.firstname, |
142 |
borrowers.cardnumber, |
143 |
borrowers.borrowernumber, |
144 |
borrowers.title AS borrower_title, |
145 |
tmp_holdsqueue.*, biblio.author, items.ccode, items.itype, biblioitems.itemtype, items.location, |
140 |
items.enumchron, items.cn_sort, biblioitems.publishercode, |
146 |
items.enumchron, items.cn_sort, biblioitems.publishercode, |
141 |
biblio.copyrightdate, biblio.subtitle, biblio.medium, |
147 |
biblio.copyrightdate, biblio.subtitle, biblio.medium, |
142 |
biblio.part_number, biblio.part_name, |
148 |
biblio.part_number, biblio.part_name, |
Lines 146-151
sub GetHoldsQueueItems {
Link Here
|
146 |
JOIN biblio USING (biblionumber) |
152 |
JOIN biblio USING (biblionumber) |
147 |
LEFT JOIN biblioitems USING (biblionumber) |
153 |
LEFT JOIN biblioitems USING (biblionumber) |
148 |
LEFT JOIN items USING ( itemnumber) |
154 |
LEFT JOIN items USING ( itemnumber) |
|
|
155 |
LEFT JOIN borrowers USING (borrowernumber) |
149 |
/; |
156 |
/; |
150 |
if ($branchlimit) { |
157 |
if ($branchlimit) { |
151 |
$query .=" WHERE tmp_holdsqueue.holdingbranch = ?"; |
158 |
$query .=" WHERE tmp_holdsqueue.holdingbranch = ?"; |
Lines 162-167
sub GetHoldsQueueItems {
Link Here
|
162 |
} |
169 |
} |
163 |
delete $row->{itemtype}; |
170 |
delete $row->{itemtype}; |
164 |
|
171 |
|
|
|
172 |
$row->{borrower} = { |
173 |
borrowernumber => $row->{borrowernumber}, |
174 |
cardnumber => $row->{cardnumber}, |
175 |
firstname => $row->{firstname}, |
176 |
othernames => $row->{othernames}, |
177 |
surname => $row->{surname}, |
178 |
title => $row->{borrower_title}, |
179 |
}; |
180 |
|
165 |
push @$items, $row; |
181 |
push @$items, $row; |
166 |
} |
182 |
} |
167 |
return $items; |
183 |
return $items; |