Lines 623-629
sub GetReserveFee {
Link Here
|
623 |
my $sth = $dbh->prepare($query); |
623 |
my $sth = $dbh->prepare($query); |
624 |
$sth->execute($borrowernumber); |
624 |
$sth->execute($borrowernumber); |
625 |
my $data = $sth->fetchrow_hashref; |
625 |
my $data = $sth->fetchrow_hashref; |
626 |
$sth->finish(); |
|
|
627 |
my $fee = $data->{'reservefee'}; |
626 |
my $fee = $data->{'reservefee'}; |
628 |
my $cntitems = @- > $bibitems; |
627 |
my $cntitems = @- > $bibitems; |
629 |
|
628 |
|
Lines 664-670
sub GetReserveFee {
Link Here
|
664 |
} |
663 |
} |
665 |
} |
664 |
} |
666 |
} |
665 |
} |
667 |
$sth1->finish; |
|
|
668 |
my $cntitemsfound = @biblioitems; |
666 |
my $cntitemsfound = @biblioitems; |
669 |
my $issues = 0; |
667 |
my $issues = 0; |
670 |
my $x = 0; |
668 |
my $x = 0; |
Lines 1007-1013
sub CancelReserve {
Link Here
|
1007 |
"; |
1005 |
"; |
1008 |
my $sth = $dbh->prepare($query); |
1006 |
my $sth = $dbh->prepare($query); |
1009 |
$sth->execute( $reserve_id ); |
1007 |
$sth->execute( $reserve_id ); |
1010 |
$sth->finish; |
|
|
1011 |
|
1008 |
|
1012 |
$query = " |
1009 |
$query = " |
1013 |
INSERT INTO old_reserves |
1010 |
INSERT INTO old_reserves |
Lines 1090-1096
sub ModReserve {
Link Here
|
1090 |
"; |
1087 |
"; |
1091 |
my $sth = $dbh->prepare($query); |
1088 |
my $sth = $dbh->prepare($query); |
1092 |
$sth->execute( $reserve_id ); |
1089 |
$sth->execute( $reserve_id ); |
1093 |
$sth->finish; |
|
|
1094 |
$query = " |
1090 |
$query = " |
1095 |
INSERT INTO old_reserves |
1091 |
INSERT INTO old_reserves |
1096 |
SELECT * |
1092 |
SELECT * |
Lines 1114-1120
sub ModReserve {
Link Here
|
1114 |
"; |
1110 |
"; |
1115 |
my $sth = $dbh->prepare($query); |
1111 |
my $sth = $dbh->prepare($query); |
1116 |
$sth->execute( $rank, $branchcode, $itemnumber, $reserve_id ); |
1112 |
$sth->execute( $rank, $branchcode, $itemnumber, $reserve_id ); |
1117 |
$sth->finish; |
|
|
1118 |
|
1113 |
|
1119 |
if ( defined( $suspend_until ) ) { |
1114 |
if ( defined( $suspend_until ) ) { |
1120 |
if ( $suspend_until ) { |
1115 |
if ( $suspend_until ) { |
Lines 1160-1166
sub ModReserveFill {
Link Here
|
1160 |
my $sth = $dbh->prepare($query); |
1155 |
my $sth = $dbh->prepare($query); |
1161 |
$sth->execute( $biblionumber, $borrowernumber, $resdate ); |
1156 |
$sth->execute( $biblionumber, $borrowernumber, $resdate ); |
1162 |
($priority) = $sth->fetchrow_array; |
1157 |
($priority) = $sth->fetchrow_array; |
1163 |
$sth->finish; |
|
|
1164 |
|
1158 |
|
1165 |
# update the database... |
1159 |
# update the database... |
1166 |
$query = "UPDATE reserves |
1160 |
$query = "UPDATE reserves |
Lines 1172-1178
sub ModReserveFill {
Link Here
|
1172 |
"; |
1166 |
"; |
1173 |
$sth = $dbh->prepare($query); |
1167 |
$sth = $dbh->prepare($query); |
1174 |
$sth->execute( $biblionumber, $resdate, $borrowernumber ); |
1168 |
$sth->execute( $biblionumber, $resdate, $borrowernumber ); |
1175 |
$sth->finish; |
|
|
1176 |
|
1169 |
|
1177 |
# move to old_reserves |
1170 |
# move to old_reserves |
1178 |
$query = "INSERT INTO old_reserves |
1171 |
$query = "INSERT INTO old_reserves |
Lines 1514-1520
sub ToggleLowestPriority {
Link Here
|
1514 |
|
1507 |
|
1515 |
my $sth = $dbh->prepare( "UPDATE reserves SET lowestPriority = NOT lowestPriority WHERE reserve_id = ?"); |
1508 |
my $sth = $dbh->prepare( "UPDATE reserves SET lowestPriority = NOT lowestPriority WHERE reserve_id = ?"); |
1516 |
$sth->execute( $reserve_id ); |
1509 |
$sth->execute( $reserve_id ); |
1517 |
$sth->finish; |
|
|
1518 |
|
1510 |
|
1519 |
_FixPriority( $reserve_id, '999999' ); |
1511 |
_FixPriority( $reserve_id, '999999' ); |
1520 |
} |
1512 |
} |
Lines 1549-1555
sub ToggleSuspend {
Link Here
|
1549 |
push( @params, $reserve_id ); |
1541 |
push( @params, $reserve_id ); |
1550 |
|
1542 |
|
1551 |
$sth->execute( @params ); |
1543 |
$sth->execute( @params ); |
1552 |
$sth->finish; |
|
|
1553 |
} |
1544 |
} |
1554 |
|
1545 |
|
1555 |
=head2 SuspendAll |
1546 |
=head2 SuspendAll |
Lines 1605-1611
sub SuspendAll {
Link Here
|
1605 |
$dbh = C4::Context->dbh; |
1596 |
$dbh = C4::Context->dbh; |
1606 |
$sth = $dbh->prepare( $query ); |
1597 |
$sth = $dbh->prepare( $query ); |
1607 |
$sth->execute( @query_params ); |
1598 |
$sth->execute( @query_params ); |
1608 |
$sth->finish; |
|
|
1609 |
} |
1599 |
} |
1610 |
|
1600 |
|
1611 |
|
1601 |
|
Lines 1689-1695
sub _FixPriority {
Link Here
|
1689 |
$j + 1, |
1679 |
$j + 1, |
1690 |
$priority[$j]->{'reserve_id'} |
1680 |
$priority[$j]->{'reserve_id'} |
1691 |
); |
1681 |
); |
1692 |
$sth->finish; |
|
|
1693 |
} |
1682 |
} |
1694 |
|
1683 |
|
1695 |
$sth = $dbh->prepare( "SELECT reserve_id FROM reserves WHERE lowestPriority = 1 ORDER BY priority" ); |
1684 |
$sth = $dbh->prepare( "SELECT reserve_id FROM reserves WHERE lowestPriority = 1 ORDER BY priority" ); |
1696 |
- |
|
|