Browse Source

got modifying reserves working correctly

master
chris 21 years ago
parent
commit
8fc581ee1c
2 changed files with 4 additions and 4 deletions
  1. +2
    -2
      C4/Reserves2.pm
  2. +2
    -2
      modrequest.pl

+ 2
- 2
C4/Reserves2.pm View File

@@ -229,11 +229,11 @@ sub getnextacctno {

sub updatereserves{
#subroutine to update a reserve
my ($rank,$biblio,$borrower,$del)=@_;
my ($rank,$biblio,$borrower,$del,$branch)=@_;
my $dbh=C4Connect;
my $query="Update reserves ";
if ($del ==0){
$query.="set priority='$rank' where
$query.="set priority='$rank',branchcode='$branch' where
biblionumber=$biblio and borrowernumber=$borrower";
} else {
$query="Select * from reserves where biblionumber=$biblio and


+ 2
- 2
modrequest.pl View File

@@ -19,12 +19,12 @@ my $input = new CGI;
my @rank=$input->param('rank-request');
my @biblio=$input->param('biblio');
my @borrower=$input->param('borrower');
my @branch=$input->param('pickup');
my $count=@rank;
my $del=0;
for (my $i=0;$i<$count;$i++){
if ($rank[$i] ne 'del' && $del == 0){
updatereserves($rank[$i],$biblio[$i],$borrower[$i],0); #from C4::Reserves2
updatereserves($rank[$i],$biblio[$i],$borrower[$i],0,$branch[$i]); #from C4::Reserves2
} elsif ($rank[$i] eq 'del'){
updatereserves($rank[$i],$biblio[$i],$borrower[$i],1); #from C4::Reserves2


Loading…
Cancel
Save