diff --git a/circ/returns.pl b/circ/returns.pl
index d72ca6d05e..7ac8161f83 100755
--- a/circ/returns.pl
+++ b/circ/returns.pl
@@ -74,10 +74,11 @@ if ($query->param('resbarcode')) {
my $resbarcode = $query->param('resbarcode');
my $tobranchcd = ReserveWaiting($item, $borrnum);
my $branchname = $branches->{$tobranchcd}->{'branchname'};
- my ($borr) = getpatroninformation(\%env, $borrnum);
+ my ($borr) = getpatroninformation(\%env, $borrnum, 0);
my $name = $borr->{'surname'}." ".$borr->{'title'}." ".$borr->{'firstname'};
my $number = "{'borrowernumber'} onClick='openWindow(this,'Member', 480, 640)'>$borr->{'cardnumber'}";
-
+ my $slip = $query->param('resslip');
+ printslip(\%env, $slip);
if ($tobranchcd ne $branch) {
my ($transfered, $messages, $iteminfo) = transferbook($tobranchcd, $resbarcode, 1);
$reservetext .= <<"EOF";
@@ -91,8 +92,6 @@ $ritext
EOF
}
- my ($iteminfo) = getiteminformation(\%env, $item);
- printreserve(\%env, $branchname, $borr, $iteminfo);
}
@@ -177,6 +176,8 @@ if ($messages->{'ResFound'}) {
my ($borr) = getpatroninformation(\%env, $res->{'borrowernumber'}, 0);
my $name = $borr->{'surname'}." ".$borr->{'title'}." ".$borr->{'firstname'};
my $number = "{'borrowernumber'} onClick='openWindow(this,'Member', 480, 640)'>$borr->{'cardnumber'}";
+ my ($iteminfo) = getiteminformation(\%env, 0, $barcode);
+
if ($res->{'ResFound'} eq "Waiting") {
$reservetext = <<"EOF";
Item marked Waiting:
@@ -189,16 +190,42 @@ $ritext
EOF
}
if ($res->{'ResFound'} eq "Reserved") {
+ my @da = localtime(time());
+ my $todaysdate = sprintf ("%0.2d", ($da[3]+1))."/".sprintf ("%0.2d", ($da[4]+1))."/".($da[5]+1900);
+ my $slip = <<"EOF";
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Date: $todaysdate;
+
+ITEM RESERVED:
+$iteminfo->{'title'} ($iteminfo->{'author'})
+barcode: $iteminfo->{'barcode'}
+
+COLLECT AT: $branchname
+
+BORROWER:
+$borr->{'surname'}, $borr->{'firstname'}
+card number: $borr->{'cardnumber'}
+Phone: $borr->{'phone'}
+$borr->{'streetaddress'}
+$borr->{'suburb'}
+$borr->{'town'}
+$borr->{'emailaddress'}
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+EOF
+
$reservetext = <<"EOF";
Reserved found: for $name ($number).
| Change status to waiting and print slip?: | +|
| Change status to waiting and print +slip?: |