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

(-)a/C4/Reserves.pm (-12 lines)
Lines 611-617 sub GetReserveFee { Link Here
611
    my $sth = $dbh->prepare($query);
611
    my $sth = $dbh->prepare($query);
612
    $sth->execute($borrowernumber);
612
    $sth->execute($borrowernumber);
613
    my $data = $sth->fetchrow_hashref;
613
    my $data = $sth->fetchrow_hashref;
614
    $sth->finish();
615
    my $fee      = $data->{'reservefee'};
614
    my $fee      = $data->{'reservefee'};
616
    my $cntitems = @- > $bibitems;
615
    my $cntitems = @- > $bibitems;
617
616
Lines 652-658 sub GetReserveFee { Link Here
652
                }
651
                }
653
            }
652
            }
654
        }
653
        }
655
        $sth1->finish;
656
        my $cntitemsfound = @biblioitems;
654
        my $cntitemsfound = @biblioitems;
657
        my $issues        = 0;
655
        my $issues        = 0;
658
        my $x             = 0;
656
        my $x             = 0;
Lines 995-1001 sub CancelReserve { Link Here
995
    ";
993
    ";
996
    my $sth = $dbh->prepare($query);
994
    my $sth = $dbh->prepare($query);
997
    $sth->execute( $reserve_id );
995
    $sth->execute( $reserve_id );
998
    $sth->finish;
999
996
1000
    $query = "
997
    $query = "
1001
        INSERT INTO old_reserves
998
        INSERT INTO old_reserves
Lines 1078-1084 sub ModReserve { Link Here
1078
        ";
1075
        ";
1079
        my $sth = $dbh->prepare($query);
1076
        my $sth = $dbh->prepare($query);
1080
        $sth->execute( $reserve_id );
1077
        $sth->execute( $reserve_id );
1081
        $sth->finish;
1082
        $query = "
1078
        $query = "
1083
            INSERT INTO old_reserves
1079
            INSERT INTO old_reserves
1084
            SELECT *
1080
            SELECT *
Lines 1102-1108 sub ModReserve { Link Here
1102
        ";
1098
        ";
1103
        my $sth = $dbh->prepare($query);
1099
        my $sth = $dbh->prepare($query);
1104
        $sth->execute( $rank, $branchcode, $itemnumber, $reserve_id );
1100
        $sth->execute( $rank, $branchcode, $itemnumber, $reserve_id );
1105
        $sth->finish;
1106
1101
1107
        if ( defined( $suspend_until ) ) {
1102
        if ( defined( $suspend_until ) ) {
1108
            if ( $suspend_until ) {
1103
            if ( $suspend_until ) {
Lines 1148-1154 sub ModReserveFill { Link Here
1148
    my $sth = $dbh->prepare($query);
1143
    my $sth = $dbh->prepare($query);
1149
    $sth->execute( $biblionumber, $borrowernumber, $resdate );
1144
    $sth->execute( $biblionumber, $borrowernumber, $resdate );
1150
    ($priority) = $sth->fetchrow_array;
1145
    ($priority) = $sth->fetchrow_array;
1151
    $sth->finish;
1152
1146
1153
    # update the database...
1147
    # update the database...
1154
    $query = "UPDATE reserves
1148
    $query = "UPDATE reserves
Lines 1160-1166 sub ModReserveFill { Link Here
1160
                ";
1154
                ";
1161
    $sth = $dbh->prepare($query);
1155
    $sth = $dbh->prepare($query);
1162
    $sth->execute( $biblionumber, $resdate, $borrowernumber );
1156
    $sth->execute( $biblionumber, $resdate, $borrowernumber );
1163
    $sth->finish;
1164
1157
1165
    # move to old_reserves
1158
    # move to old_reserves
1166
    $query = "INSERT INTO old_reserves
1159
    $query = "INSERT INTO old_reserves
Lines 1502-1508 sub ToggleLowestPriority { Link Here
1502
1495
1503
    my $sth = $dbh->prepare( "UPDATE reserves SET lowestPriority = NOT lowestPriority WHERE reserve_id = ?");
1496
    my $sth = $dbh->prepare( "UPDATE reserves SET lowestPriority = NOT lowestPriority WHERE reserve_id = ?");
1504
    $sth->execute( $reserve_id );
1497
    $sth->execute( $reserve_id );
1505
    $sth->finish;
1506
    
1498
    
1507
    _FixPriority( $reserve_id, '999999' );
1499
    _FixPriority( $reserve_id, '999999' );
1508
}
1500
}
Lines 1537-1543 sub ToggleSuspend { Link Here
1537
    push( @params, $reserve_id );
1529
    push( @params, $reserve_id );
1538
1530
1539
    $sth->execute( @params );
1531
    $sth->execute( @params );
1540
    $sth->finish;
1541
}
1532
}
1542
1533
1543
=head2 SuspendAll
1534
=head2 SuspendAll
Lines 1593-1599 sub SuspendAll { Link Here
1593
    $dbh = C4::Context->dbh;
1584
    $dbh = C4::Context->dbh;
1594
    $sth = $dbh->prepare( $query );
1585
    $sth = $dbh->prepare( $query );
1595
    $sth->execute( @query_params );
1586
    $sth->execute( @query_params );
1596
    $sth->finish;
1597
}
1587
}
1598
1588
1599
1589
Lines 1677-1683 sub _FixPriority { Link Here
1677
            $j + 1,
1667
            $j + 1,
1678
            $priority[$j]->{'reserve_id'}
1668
            $priority[$j]->{'reserve_id'}
1679
        );
1669
        );
1680
        $sth->finish;
1681
    }
1670
    }
1682
    
1671
    
1683
    $sth = $dbh->prepare( "SELECT reserve_id FROM reserves WHERE lowestPriority = 1 ORDER BY priority" );
1672
    $sth = $dbh->prepare( "SELECT reserve_id FROM reserves WHERE lowestPriority = 1 ORDER BY priority" );
1684
- 

Return to bug 10682