Lines 104-110
BEGIN {
Link Here
|
104 |
&AddReserve |
104 |
&AddReserve |
105 |
|
105 |
|
106 |
&GetReserve |
106 |
&GetReserve |
107 |
&GetReservesFromBorrowernumber |
|
|
108 |
&GetReservesForBranch |
107 |
&GetReservesForBranch |
109 |
&GetReservesToBranch |
108 |
&GetReservesToBranch |
110 |
&GetReserveCount |
109 |
&GetReserveCount |
Lines 274-313
sub GetReserve {
Link Here
|
274 |
return $sth->fetchrow_hashref(); |
273 |
return $sth->fetchrow_hashref(); |
275 |
} |
274 |
} |
276 |
|
275 |
|
277 |
=head2 GetReservesFromBorrowernumber |
|
|
278 |
|
279 |
$borrowerreserv = GetReservesFromBorrowernumber($borrowernumber,$tatus); |
280 |
|
281 |
TODO :: Descritpion |
282 |
|
283 |
=cut |
284 |
|
285 |
sub GetReservesFromBorrowernumber { |
286 |
my ( $borrowernumber, $status ) = @_; |
287 |
my $dbh = C4::Context->dbh; |
288 |
my $sth; |
289 |
if ($status) { |
290 |
$sth = $dbh->prepare(" |
291 |
SELECT * |
292 |
FROM reserves |
293 |
WHERE borrowernumber=? |
294 |
AND found =? |
295 |
ORDER BY reservedate |
296 |
"); |
297 |
$sth->execute($borrowernumber,$status); |
298 |
} else { |
299 |
$sth = $dbh->prepare(" |
300 |
SELECT * |
301 |
FROM reserves |
302 |
WHERE borrowernumber=? |
303 |
ORDER BY reservedate |
304 |
"); |
305 |
$sth->execute($borrowernumber); |
306 |
} |
307 |
my $data = $sth->fetchall_arrayref({}); |
308 |
return @$data; |
309 |
} |
310 |
|
311 |
=head2 CanBookBeReserved |
276 |
=head2 CanBookBeReserved |
312 |
|
277 |
|
313 |
$canReserve = &CanBookBeReserved($borrowernumber, $biblionumber) |
278 |
$canReserve = &CanBookBeReserved($borrowernumber, $biblionumber) |
314 |
- |
|
|