- my $reservetext;
- my $branchname = $branches->{$res->{'branchcode'}}->{'branchname'};
- my ($borr) = getpatroninformation(\%env, $res->{'borrowernumber'}, 0);
- my $name = $borr->{'surname'}." ".$borr->{'title'}." ".$borr->{'firstname'};
- my $number = "<a href=/cgi-bin/koha/moremember.pl?bornum=$borr->{'borrowernumber'} onClick='openWindow(this,'Member', 480, 640)'>$borr->{'cardnumber'}</a>";
- if ($res->{'ResFound'} eq "Waiting") {
- $reservetext = <<"EOF";
-<font color='red' size='+2'>Item marked Waiting:</font><br>
- Item is marked waiting at $branchname for $name ($number).<br>
-<table border=1 cellpadding=5 cellspacing=0>
-<tr><td>Cancel reservation and then attempt transfer: </td>
-<td>
-<form method=post action='branchtransfers.pl'>
-$ritext
-<input type=hidden name=itemnumber value=$res->{'itemnumber'}>
-<input type=hidden name=borrowernumber value=$res->{'borrowernumber'}>
-<input type=hidden name=tobranchcd value=$tobranchcd>
-<input type=hidden name=barcode value=$barcode>
-<input type=hidden name=request value='KillWaiting'>
-<input type=submit value="Cancel">
-</form>
-</td></tr>
-<tr><td>Ignore and return to transfers: </td>
-<td>
-<form method=post action='branchtransfers.pl'>
-$ritext
-<input type=hidden name=tobranchcd value=$tobranchcd>
-<input type=hidden name=barcode value=0>
-<input type=submit value="Ignore">
-</form>
-</td></tr></table>
-EOF
- }
- if ($res->{'ResFound'} eq "Reserved") {
- $reservetext = <<"EOF";
-<font color='red' size='+2'>Reserved:</font> reserve found for $name ($number).
-<table border=1 cellpadding=5 cellspacing=0>
-<tr><td>Set reserve to waiting and transfer book to <b>$branchname </b>: </td>
-<td>
-<form method=post action='branchtransfers.pl'>
-$ritext
-<input type=hidden name=itemnumber value=$res->{'itemnumber'}>
-<input type=hidden name=borrowernumber value=$res->{'borrowernumber'}>
-<input type=hidden name=barcode value=$barcode>
-<input type=hidden name=request value='SetWaiting'>
-<input type=submit value="Waiting">
-</form>
-</td></tr>
-<tr><td>Cancel reservation and then attempt transfer: </td>
-<td>
-<form method=post action='branchtransfers.pl'>
-$ritext
-<input type=hidden name=biblionumber value=$res->{'biblionumber'}>
-<input type=hidden name=borrowernumber value=$res->{'borrowernumber'}>
-<input type=hidden name=tobranchcd value=$tobranchcd>
-<input type=hidden name=barcode value=$barcode>
-<input type=hidden name=request value='KillReserved'>
-<input type=submit value="Cancel">
-</form>
-</td></tr><tr><td>Ignore and return to transfers: </td>
-<td>
-<form method=post action='branchtransfers.pl'>
-<input type=hidden name=tobranchcd value=$tobranchcd>
-<input type=hidden name=barcode value=0>
-$ritext
-<input type=submit value="Ignore">
-</form>
-</td></tr></table>
-EOF
- }
- $reservefoundtext = <<"EOF";
-<table border=1 cellpadding=5 cellspacing=0 bgcolor='#dddddd'>
-<tr><th bgcolor=$headerbackgroundcolor background=$backgroundimage><font>Reserve Found</font></th></tr>
-<tr><td> $reservetext </td></tr></table>
-EOF
-}
-
-#####################
-
-foreach my $code (keys %$messages) {
- if ($code eq 'BadBarcode'){
- $messagetext .= "<font color='red' size='+2'> No Item with barcode: $messages->{'BadBarcode'} </font> <br>";
- }
- if ($code eq 'IsPermanent'){
- my $braname = $branches->{$messages->{'IsPermanent'}}->{'branchname'};
- $messagetext .= "<font color='red' size='+2'> Please return item to home branch: $braname </font> <br>";
- }
- if ($code eq 'DestinationEqualsHolding'){
- $messagetext .= "<font color='red' size='+2'> Item is already at destination branch. </font> <br>";
- }
- if ($code eq 'WasReturned') {
- my ($borrowerinfo) = getpatroninformation(\%env, $messages->{'WasReturned'}, 0);