Browse Source

Fixed a bug in issuing reserved books. Was calling non-existent

printreserve subroutine
3.0.x
tonnesen 21 years ago
parent
commit
3186e690ce
  1. 6
      C4/Circulation/Circ2.pm
  2. 6
      circ/circulation.pl

6
C4/Circulation/Circ2.pm

@ -247,17 +247,17 @@ sub issuebook {
my ($resborrower, $flags)=getpatroninformation($env, $resbor,0);
if ($responses->{2} eq '') {
$questionnumber=2;
$question="Reserved for $resborrower->{'firstname'} $resborrower->{'surname'} ($resborrower->{'cardnumber'}) [$resbor]\nAllow issue?";
$question="Reserved for $resborrower->{'firstname'} $resborrower->{'surname'} ($resborrower->{'cardnumber'}) since $resrec->{'reservedate'}\nAllow issue?";
$defaultanswer='N';
last SWITCH;
} elsif ($responses->{2} eq 'N') {
printreserve($env, $resrec, $resborrower, $iteminformation);
#printreserve($env, $resrec, $resborrower, $iteminformation);
$rejected=-1;
last SWITCH;
} else {
if ($responses->{3} eq '') {
$questionnumber=3;
$question="Cancel reserve for $resborrower->{'firstname'} $resborrower->{'surname'} ($resborrower->{'cardnumber'}?";
$question="Cancel reserve for $resborrower->{'firstname'} $resborrower->{'surname'} ($resborrower->{'cardnumber'})?";
$defaultanswer='N';
last SWITCH;
} elsif ($responses->{3} eq 'Y') {

6
circ/circulation.pl

@ -55,6 +55,10 @@ sub issues {
print "Error issuing book: $rejected<br>\n";
}
}
my $responsesform='';
foreach (keys %responses) {
$responsesform.="<input type=hidden name=response-$_ value=$responses{$_}>\n";
}
if ($question) {
print << "EOF";
<table border=1 bgcolor=#dddddd>
@ -73,6 +77,7 @@ sub issues {
<input type=hidden name=borrnumber value=$borrnumber>
<input type=hidden name=barcode value=$barcode>
<input type=hidden name=questionnumber value=$questionnumber>
$responsesform
<input type=hidden name=answer value=Y>
<input type=submit value=Yes>
</form>
@ -83,6 +88,7 @@ sub issues {
<input type=hidden name=borrnumber value=$borrnumber>
<input type=hidden name=barcode value=$barcode>
<input type=hidden name=questionnumber value=$questionnumber>
$responsesform
<input type=hidden name=answer value=N>
<input type=submit value=No>
</form>

Loading…
Cancel
Save