[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/C4 Print.pm,1.15,1.16
From: |
Paul POULAIN |
Subject: |
[Koha-cvs] CVS: koha/C4 Print.pm,1.15,1.16 |
Date: |
Mon, 03 May 2004 02:26:14 -0700 |
Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4351/C4
Modified Files:
Print.pm
Log Message:
copying printslip from circulation.pl
Index: Print.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Print.pm,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** Print.pm 11 Jun 2003 18:44:01 -0000 1.15
--- Print.pm 3 May 2004 09:26:12 -0000 1.16
***************
*** 77,81 ****
(return) unless (C4::Context->boolean_preference('printcirculationslips'));
- my $file=time; # FIXME - Not used
my $queue = $env->{'queue'};
# FIXME - If 'queue' is undefined or empty, then presumably it should
--- 77,80 ----
***************
*** 171,196 ****
=item printslip
! &printslip($env, $text)
!
! Prints the string C<$text> to a printer. C<$env-E<gt>{queue}>
! specifies the queue to print to.
!
! If C<$env-E<gt>{queue}> is empty or set to C<nulllp>, C<&printslip>
! will print to the file F</tmp/kohares>.
=cut
#'
- # FIXME - There's also a &printslip in circ/circulation.pl
sub printslip {
! my($env, $slip)address@hidden;
! my $printer = $env->{'printer'};
! (return) unless (C4::Context->boolean_preference('printcirculationslips'));
! if ($printer eq "" || $printer eq 'nulllp') {
! open (PRINTER,">/tmp/kohares");
! } else {
! open (PRINTER, "| lpr -P $printer >/dev/null") or die "Couldn't write to
queue:$!\n";
! }
! print PRINTER $slip;
! close PRINTER;
}
--- 170,209 ----
=item printslip
! &printslip($env, $borrowernumber)
+ print a slip for the given $borrowernumber
+
=cut
#'
sub printslip {
! my ($env,$borrowernumber)address@hidden;
! my ($borrower, $flags) = getpatroninformation($env,$borrowernumber,0);
! $env->{'todaysissues'}=1;
! my ($borrowerissues) = currentissues($env, $borrower);
! $env->{'nottodaysissues'}=1;
! $env->{'todaysissues'}=0;
! my ($borroweriss2)=currentissues($env, $borrower);
! $env->{'nottodaysissues'}=0;
! my $i=0;
! my @issues;
! foreach (sort {$a <=> $b} keys %$borrowerissues) {
! $issues[$i]=$borrowerissues->{$_};
! my $dd=$issues[$i]->{'date_due'};
! #convert to nz style dates
! #this should be set with some kinda config variable
! my @tempdate=split(/-/,$dd);
! $issues[$i]->{'date_due'}="$tempdate[2]/$tempdate[1]/$tempdate[0]";
! $i++;
! }
! foreach (sort {$a <=> $b} keys %$borroweriss2) {
! $issues[$i]=$borroweriss2->{$_};
! my $dd=$issues[$i]->{'date_due'};
! #convert to nz style dates
! #this should be set with some kinda config variable
! my @tempdate=split(/-/,$dd);
! $issues[$i]->{'date_due'}="$tempdate[2]/$tempdate[1]/$tempdate[0]";
! $i++;
! }
! remoteprint($env,address@hidden,$borrower);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/C4 Print.pm,1.15,1.16,
Paul POULAIN <=