koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha/circ circulation.pl,1.28,1.29


From: Chris Cormack
Subject: [Koha-cvs] CVS: koha/circ circulation.pl,1.28,1.29
Date: Tue, 18 Jun 2002 15:47:01 -0700

Update of /cvsroot/koha/koha/circ
In directory usw-pr-cvs1:/tmp/cvs-serv18906/circ

Modified Files:
        circulation.pl 
Log Message:
issues printing issue slips again


Index: circulation.pl
===================================================================
RCS file: /cvsroot/koha/koha/circ/circulation.pl,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -r1.28 -r1.29
*** circulation.pl      13 Jun 2002 03:17:18 -0000      1.28
--- circulation.pl      18 Jun 2002 22:46:59 -0000      1.29
***************
*** 9,13 ****
  use C4::Search;
  use C4::Output;
! 
  
  my %env;
--- 9,13 ----
  use C4::Search;
  use C4::Output;
! use C4::Print;
  
  my %env;
***************
*** 68,71 ****
--- 68,85 ----
  my $borrowernumber = $query->param('borrnumber');    
  
+ # check and see if we should print
+ my $print=$query->param('print');
+ my $barcode = $query->param('barcode');
+ #if ($barcode eq '' ){
+ #    $print = 'yes';
+ #}
+ if ($print eq 'yes' && $borrowernumber ne ''){
+     printslip(\%env,$borrowernumber);    
+     $query->param('borrnumber','');
+     $borrowernumber='';
+ }
+     
+ 
+ 
  # get the currently issued books......
  my $borrower;
***************
*** 88,92 ****
  
  # if the barcode is set    
! my $barcode = $query->param('barcode');
  my ($iteminformation, $duedate, $rejected, $question, $questionnumber, 
$defaultanswer);
  
--- 102,106 ----
  
  # if the barcode is set    
! 
  my ($iteminformation, $duedate, $rejected, $question, $questionnumber, 
$defaultanswer);
  
***************
*** 155,159 ****
  my $title = <<"EOF";
  <table align="right"><tr><td>
! <a href=circulation.pl>
  <img src="/images/button-next-borrower.gif" width="171" height="42" 
border="0" alt="Next Borrower"></a> &nbsp
  <a href=returns.pl>
--- 169,173 ----
  my $title = <<"EOF";
  <table align="right"><tr><td>
! <a 
href=circulation.pl?borrnumber=$borrowernumber&branch=$branch&printer=$printer&print=yes>
  <img src="/images/button-next-borrower.gif" width="171" height="42" 
border="0" alt="Next Borrower"></a> &nbsp
  <a href=returns.pl>
***************
*** 180,183 ****
--- 194,198 ----
  <font color=black><b>Enter borrower card number<br> or partial last 
name</b></font></td></tr>
  <tr><td><input name=findborrower></td></tr>
+   
  </table>
  </form>
***************
*** 303,306 ****
--- 318,322 ----
  <input type=hidden name=branch value=$branch>
  <input type=hidden name=printer value=$printer>
+ <input type=hidden name=print value=yes>
  </td></tr></table>
  </td></tr></table>
***************
*** 418,421 ****
--- 434,438 ----
  print $messagetable;
  
+ 
  unless ($borrower) {
      if ($borrowerslist) {
***************
*** 548,550 ****
  
  
! 
--- 565,597 ----
  
  
! 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 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 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);
! }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]