From 4ec4fd9552ac92c29bd40b641eaac49d810d919a Mon Sep 17 00:00:00 2001 From: finlayt Date: Tue, 23 Jul 2002 03:32:42 +0000 Subject: [PATCH] reactivated the printreserve method that is used to print a slip when a reserved book is returned. this is used in /circ/returns.pl --- C4/Print.pm | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/C4/Print.pm b/C4/Print.pm index f20e523541..821b879505 100644 --- a/C4/Print.pm +++ b/C4/Print.pm @@ -54,31 +54,27 @@ sub remoteprint { } sub printreserve { - my($env,$resrec,$rbordata,$itemdata)=@_; + my($env, $branchname, $bordata, $itemdata)=@_; my $file=time; - my $queue = $env->{'queue'}; - #if ($queue eq "") { + my $printer = $env->{'printer'}; + if ($printer eq "" || $printer eq 'nulllp') { open (PRINTER,">/tmp/kohares"); - #} else { - # open (PRINTER, "| lpr -P $queue") or die "Couldn't write to queue:$!\n"; - #} - print PRINTER "Collect at $resrec->{'branchcode'}\r\n\r\n"; - print PRINTER "$rbordata->{'surname'}; $rbordata->{'firstname'}\r\n"; - print PRINTER "$rbordata->{'cardnumber'}\r\n"; - print PRINTER "Phone: $rbordata->{'phone'}\r\n"; - print PRINTER "$rbordata->{'streetaddress'}\r\n"; - print PRINTER "$rbordata->{'suburb'}\r\n"; - print PRINTER "$rbordata->{'town'}\r\n"; - print PRINTER "$rbordata->{'emailaddress'}\r\n\r\n"; + } else { + open (PRINTER, "| lpr -P $printer") or die "Couldn't write to queue:$!\n"; + } + print PRINTER "Collect at $branchname \r\n\r\n"; + print PRINTER "$bordata->{'surname'}; $bordata->{'firstname'}\r\n"; + print PRINTER "$bordata->{'cardnumber'}\r\n"; + print PRINTER "Phone: $bordata->{'phone'}\r\n"; + print PRINTER "$bordata->{'streetaddress'}\r\n"; + print PRINTER "$bordata->{'suburb'}\r\n"; + print PRINTER "$bordata->{'town'}\r\n"; + print PRINTER "$bordata->{'emailaddress'}\r\n\r\n"; print PRINTER "$itemdata->{'barcode'}\r\n"; print PRINTER "$itemdata->{'title'}\r\n"; print PRINTER "$itemdata->{'author'}"; print PRINTER "\r\n\r\n\r\n\r\n\r\n\r\n\r\n"; - if ($env->{'printtype'} eq "docket"){ - #print chr(27).char(105); - } close PRINTER; - #system("lpr /tmp/$file"); } END { } # module clean-up code here (global destructor) -- 2.39.5