[Koha-cvs] CVS: koha/opac opac-reserve.pl,1.22,1.22.2.1

Paul POULAIN tipaul at users.sourceforge.net
Thu Feb 10 14:17:25 CET 2005


Update of /cvsroot/koha/koha/opac
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20070/opac

Modified Files:
      Tag: rel_2_2
	opac-reserve.pl 
Log Message:
do not show reserve fee if it's 0

Index: opac-reserve.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-reserve.pl,v
retrieving revision 1.22
retrieving revision 1.22.2.1
diff -C2 -r1.22 -r1.22.2.1
*** opac-reserve.pl	8 Nov 2004 19:56:26 -0000	1.22
--- opac-reserve.pl	10 Feb 2005 13:17:22 -0000	1.22.2.1
***************
*** 202,206 ****
  	if ($proceed && $branch) {
  		$fee = sprintf "%.02f", $fee;
! 		$template->param(fee => $fee);
  		$template->param(item_types_selected => 1);
  	} else {
--- 202,206 ----
  	if ($proceed && $branch) {
  		$fee = sprintf "%.02f", $fee;
! 		$template->param(fee => $fee,istherefee => $fee>0?1:0);
  		$template->param(item_types_selected => 1);
  	} else {
***************
*** 225,233 ****
  		CreateReserve(undef,$branch,$borrowernumber,$biblionumber,'a', undef, $rank,'',$title);
  	}
! 	print $query->redirect("/cgi-bin/koha/opac-search.pl");
  } else {
  	# Here we check that the borrower can actually make reserves Stage 1.
  	my $noreserves = 0;
  	my $maxoutstanding = C4::Context->preference("maxoustanding");
  	if ($borr->{'amountoutstanding'} > $maxoutstanding) {
  		my $amount = sprintf "\$%.02f", $borr->{'amountoutstanding'};
--- 225,234 ----
  		CreateReserve(undef,$branch,$borrowernumber,$biblionumber,'a', undef, $rank,'',$title);
  	}
! 	print $query->redirect("/cgi-bin/koha/opac-user.pl");
  } else {
  	# Here we check that the borrower can actually make reserves Stage 1.
  	my $noreserves = 0;
  	my $maxoutstanding = C4::Context->preference("maxoustanding");
+ 	$template->param(noreserve => 1) unless $maxoutstanding;
  	if ($borr->{'amountoutstanding'} > $maxoutstanding) {
  		my $amount = sprintf "\$%.02f", $borr->{'amountoutstanding'};





More information about the Koha-cvs mailing list