[Koha-cvs] CVS: koha/circ returns.pl,1.8,1.9

Finlay Thompson finlayt at users.sourceforge.net
Wed Jul 24 05:14:06 CEST 2002


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

Modified Files:
	returns.pl 
Log Message:

fixed up the reserves. Can view the printed slip before it is printed!


Index: returns.pl
===================================================================
RCS file: /cvsroot/koha/koha/circ/returns.pl,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** returns.pl	23 Jul 2002 03:28:36 -0000	1.8
--- returns.pl	24 Jul 2002 03:14:04 -0000	1.9
***************
*** 75,82 ****
      my $tobranchcd = ReserveWaiting($item, $borrnum);
      my $branchname = $branches->{$tobranchcd}->{'branchname'};
!     my ($borr) = getpatroninformation(\%env, $borrnum);
      my $name = $borr->{'surname'}." ".$borr->{'title'}." ".$borr->{'firstname'};
      my $number = "<a href=/cgi-bin/koha/moremember.pl?bornum=$borr->{'borrowernumber'} onClick='openWindow(this,'Member', 480, 640)'>$borr->{'cardnumber'}</a>";
! 
      if ($tobranchcd ne $branch) {
  	my ($transfered, $messages, $iteminfo) = transferbook($tobranchcd, $resbarcode, 1);
--- 75,83 ----
      my $tobranchcd = ReserveWaiting($item, $borrnum);
      my $branchname = $branches->{$tobranchcd}->{'branchname'};
!     my ($borr) = getpatroninformation(\%env, $borrnum, 0);
      my $name = $borr->{'surname'}." ".$borr->{'title'}." ".$borr->{'firstname'};
      my $number = "<a href=/cgi-bin/koha/moremember.pl?bornum=$borr->{'borrowernumber'} onClick='openWindow(this,'Member', 480, 640)'>$borr->{'cardnumber'}</a>";
!     my $slip = $query->param('resslip');
!     printslip(\%env, $slip);
      if ($tobranchcd ne $branch) {
  	my ($transfered, $messages, $iteminfo) = transferbook($tobranchcd, $resbarcode, 1);
***************
*** 92,97 ****
  EOF
      }
-     my ($iteminfo) = getiteminformation(\%env, $item);
-     printreserve(\%env, $branchname, $borr, $iteminfo);
  }
  
--- 93,96 ----
***************
*** 178,181 ****
--- 177,182 ----
      my $name = $borr->{'surname'}." ".$borr->{'title'}." ".$borr->{'firstname'};
      my $number = "<a href=/cgi-bin/koha/moremember.pl?bornum=$borr->{'borrowernumber'} onClick='openWindow(this,'Member', 480, 640)'>$borr->{'cardnumber'}</a>";
+     my ($iteminfo) = getiteminformation(\%env, 0, $barcode);
+ 
      if ($res->{'ResFound'} eq "Waiting") {
  	$reservetext = <<"EOF";
***************
*** 190,197 ****
      } 
      if ($res->{'ResFound'} eq "Reserved") {
  	$reservetext = <<"EOF";
  <font color='red' size='+2'>Reserved found:</font> for $name ($number).
  <table cellpadding=5 cellspacing=0>
! <tr><td valign="top">Change status to waiting and print slip?: </td>
  <td valign="top">
  <form method=post action='returns.pl'>
--- 191,223 ----
      } 
      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";
  <font color='red' size='+2'>Reserved found:</font> for $name ($number).
  <table cellpadding=5 cellspacing=0>
! <tr><td valign="top">Change status to waiting and print 
! <a href="" onClick='alert(document.forms[0].resslip.value); return false'>slip</a>?: </td>
  <td valign="top">
  <form method=post action='returns.pl'>
***************
*** 200,203 ****
--- 226,230 ----
  <input type=hidden name=borrowernumber value=$res->{'borrowernumber'}>
  <input type=hidden name=resbarcode value=$barcode>
+ <input type=hidden name=resslip value="$slip">
  <input type=submit value="Print">
  </form>





More information about the Koha-cvs mailing list