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

(-)a/C4/Reserves.pm (-1 / +12 lines)
Lines 40-45 use C4::Dates qw( format_date_in_iso ); Link Here
40
use Koha::DateUtils;
40
use Koha::DateUtils;
41
41
42
use List::MoreUtils qw( firstidx );
42
use List::MoreUtils qw( firstidx );
43
use Carp;
43
44
44
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
45
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
45
46
Lines 149-154 sub AddReserve { Link Here
149
        $constraint, $bibitems,  $priority, $resdate, $expdate, $notes,
150
        $constraint, $bibitems,  $priority, $resdate, $expdate, $notes,
150
        $title,      $checkitem, $found
151
        $title,      $checkitem, $found
151
    ) = @_;
152
    ) = @_;
153
154
    my ($count) = C4::Context->dbh->selectrow_array(
155
        'SELECT COUNT(*) FROM reserves WHERE biblionumber = ? AND borrowernumber = ?',
156
        undef,
157
        ( $biblionumber, $borrowernumber )
158
    );
159
    if ( $count > 0 ) {
160
        carp("AddReserve: borrower $borrowernumber already has $count holds for biblionumber $biblionumber");
161
        return;
162
    }
163
152
    my $fee =
164
    my $fee =
153
          GetReserveFee($borrowernumber, $biblionumber, $constraint,
165
          GetReserveFee($borrowernumber, $biblionumber, $constraint,
154
            $bibitems );
166
            $bibitems );
155
- 

Return to bug 5144