Changed so that when a Waiting item is returned the holding branch is updated.
authorfinlayt <finlayt>
Thu, 5 Sep 2002 00:06:30 +0000 (00:06 +0000)
committerfinlayt <finlayt>
Thu, 5 Sep 2002 00:06:30 +0000 (00:06 +0000)
circ/returns.pl

index 5482b87..bd16853 100755 (executable)
@@ -210,6 +210,8 @@ if ($messages->{'ResFound'}) {
     my ($iteminfo) = getiteminformation(\%env, 0, $barcode);
 
     if ($res->{'ResFound'} eq "Waiting") {
+# transfer book
+       my ($transfered, $mess, $item) = transferbook($branch, $barcode, 1);
        $reservetext = <<"EOF";
 <font color='red' size='+2'>Item marked Waiting:</font><br>
     Item $iteminfo->{'title'} ($iteminfo->{'author'}) <br>
@@ -279,7 +281,7 @@ EOF
 
 # collect the messages and put into message table....
 foreach my $code (keys %$messages) {
-    warn $code;
+#    warn $code;
     if ($code eq 'BadBarcode'){
        $messagetext .= "<font color='red' size='+2'> No Item with barcode: $messages->{'BadBarcode'} </font> <br>";
     }
@@ -336,7 +338,7 @@ EOF
            $displayflag = "<font color=red>$flag</font>";
        } else {
            $displayflag = $flag;
-       }
+       }  
        if ($flag eq 'CHARGES') {
            $flaginfotext.= <<"EOF";
 <tr><td valign=top>$displayflag</td>