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 278-317
sub GetReserve {
Link Here
|
278 |
return $sth->fetchrow_hashref(); |
277 |
return $sth->fetchrow_hashref(); |
279 |
} |
278 |
} |
280 |
|
279 |
|
281 |
=head2 GetReservesFromBorrowernumber |
|
|
282 |
|
283 |
$borrowerreserv = GetReservesFromBorrowernumber($borrowernumber,$tatus); |
284 |
|
285 |
TODO :: Descritpion |
286 |
|
287 |
=cut |
288 |
|
289 |
sub GetReservesFromBorrowernumber { |
290 |
my ( $borrowernumber, $status ) = @_; |
291 |
my $dbh = C4::Context->dbh; |
292 |
my $sth; |
293 |
if ($status) { |
294 |
$sth = $dbh->prepare(" |
295 |
SELECT * |
296 |
FROM reserves |
297 |
WHERE borrowernumber=? |
298 |
AND found =? |
299 |
ORDER BY reservedate |
300 |
"); |
301 |
$sth->execute($borrowernumber,$status); |
302 |
} else { |
303 |
$sth = $dbh->prepare(" |
304 |
SELECT * |
305 |
FROM reserves |
306 |
WHERE borrowernumber=? |
307 |
ORDER BY reservedate |
308 |
"); |
309 |
$sth->execute($borrowernumber); |
310 |
} |
311 |
my $data = $sth->fetchall_arrayref({}); |
312 |
return @$data; |
313 |
} |
314 |
|
315 |
=head2 CanBookBeReserved |
280 |
=head2 CanBookBeReserved |
316 |
|
281 |
|
317 |
$canReserve = &CanBookBeReserved($borrowernumber, $biblionumber) |
282 |
$canReserve = &CanBookBeReserved($borrowernumber, $biblionumber) |
318 |
- |
|
|