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

(-)a/C4/Items.pm (-5 / +11 lines)
Lines 2258-2268 sub DelItemCheck { Link Here
2258
2258
2259
2259
2260
    # check that there is no issue on this item before deletion.
2260
    # check that there is no issue on this item before deletion.
2261
    my $sth=$dbh->prepare("select * from issues i where i.itemnumber=?");
2261
    my $sth = $dbh->prepare(q{
2262
        SELECT COUNT(*) FROM issues
2263
        WHERE itemnumber = ?
2264
    });
2262
    $sth->execute($itemnumber);
2265
    $sth->execute($itemnumber);
2266
    my ($onloan) = $sth->fetchrow;
2263
2267
2264
    my $item = GetItem($itemnumber);
2268
    my $item = GetItem($itemnumber);
2265
    my $onloan=$sth->fetchrow;
2266
2269
2267
    if ($onloan){
2270
    if ($onloan){
2268
        $error = "book_on_loan" 
2271
        $error = "book_on_loan" 
Lines 2275-2283 sub DelItemCheck { Link Here
2275
    }
2278
    }
2276
	else{
2279
	else{
2277
        # check it doesnt have a waiting reserve
2280
        # check it doesnt have a waiting reserve
2278
        $sth=$dbh->prepare("SELECT * FROM reserves WHERE (found = 'W' or found = 'T') AND itemnumber = ?");
2281
        $sth = $dbh->prepare(q{
2282
            SELECT COUNT(*) FROM reserves
2283
            WHERE (found = 'W' OR found = 'T')
2284
            AND itemnumber = ?
2285
        });
2279
        $sth->execute($itemnumber);
2286
        $sth->execute($itemnumber);
2280
        my $reserve=$sth->fetchrow;
2287
        my ($reserve) = $sth->fetchrow;
2281
        if ($reserve){
2288
        if ($reserve){
2282
            $error = "book_reserved";
2289
            $error = "book_reserved";
2283
        } elsif ($countanalytics > 0){
2290
        } elsif ($countanalytics > 0){
2284
- 

Return to bug 11338