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

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

Return to bug 5144