[Koha-cvs] CVS: koha/C4 Print.pm,1.3.2.5,1.3.2.6
Steve Tonnesen
tonnesen at users.sourceforge.net
Thu Oct 24 18:20:44 CEST 2002
Update of /cvsroot/koha/koha/C4
In directory usw-pr-cvs1:/tmp/cvs-serv6391
Modified Files:
Tag: rel-1-2
Print.pm
Log Message:
Added config checks for printing circulation slips.
Index: Print.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Print.pm,v
retrieving revision 1.3.2.5
retrieving revision 1.3.2.6
diff -C2 -r1.3.2.5 -r1.3.2.6
*** Print.pm 16 Aug 2002 22:50:05 -0000 1.3.2.5
--- Print.pm 24 Oct 2002 16:20:40 -0000 1.3.2.6
***************
*** 34,41 ****
sub remoteprint {
my ($env,$items,$borrower)=@_;
! #open (FILE,">/tmp/olwen");
! #print FILE "queue $env->{'queue'}";
! #close FILE;
! #debug_msg($env,"In print");
my $file=time;
my $queue = $env->{'queue'};
--- 34,40 ----
sub remoteprint {
my ($env,$items,$borrower)=@_;
!
! my $config=configfile();
! (return) unless ($config->{printcirculationslips});
my $file=time;
my $queue = $env->{'queue'};
***************
*** 45,49 ****
open(PRINTER, "| lpr -P $queue") or die "Couldn't write to queue:$queue!\n";
}
- # print $queue;
#open (FILE,">/tmp/$file");
my $i=0;
--- 44,47 ----
***************
*** 57,61 ****
print PRINTER "$borrower->{'title'} $borrower->{'initials'} $borrower->{'surname'}\r\n";
while ($items->[$i]){
- # print $i;
my $itemdata = $items->[$i];
print PRINTER "$i $itemdata->{'title'}\r\n";
--- 55,58 ----
***************
*** 77,80 ****
--- 74,79 ----
my $file=time;
my $printer = $env->{'printer'};
+ my $config=configfile();
+ (return) unless ($config->{'printreserveslips'});
if ($printer eq "" || $printer eq 'nulllp') {
open (PRINTER,">>/tmp/kohares");
***************
*** 116,119 ****
--- 115,120 ----
my($env, $slip)=@_;
my $printer = $env->{'printer'};
+ my $config=configfile();
+ (return) unless ($config->{printcirculationslips});
if ($printer eq "" || $printer eq 'nulllp') {
open (PRINTER,">/tmp/kohares");
More information about the Koha-cvs
mailing list