[Koha-cvs] koha/opac opac-reserve.pl [dev_week]

Joshua Ferraro jmf at kados.org
Thu Oct 5 21:43:17 CEST 2006


CVSROOT:	/sources/koha
Module name:	koha
Branch:		dev_week
Changes by:	Joshua Ferraro <kados>	06/10/05 19:43:17

Modified files:
	opac           : opac-reserve.pl 

Log message:
	Fix for bug #1190: Reservation fee is charged even when it's not specified in the borrower rules

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/opac/opac-reserve.pl?cvsroot=koha&only_with_tag=dev_week&r1=1.22.2.9.2.1&r2=1.22.2.9.2.2

Patches:
Index: opac-reserve.pl
===================================================================
RCS file: /sources/koha/koha/opac/opac-reserve.pl,v
retrieving revision 1.22.2.9.2.1
retrieving revision 1.22.2.9.2.2
diff -u -b -r1.22.2.9.2.1 -r1.22.2.9.2.2
--- opac-reserve.pl	18 Aug 2006 16:14:15 -0000	1.22.2.9.2.1
+++ opac-reserve.pl	5 Oct 2006 19:43:17 -0000	1.22.2.9.2.2
@@ -136,7 +136,9 @@
     $itm->{$itm->{'publictype'}} = 1;
     # FIXME CalcReserveFee is supposed to be internal-use-only
     my $fee  = CalcReserveFee(undef, $borrowernumber, $itm->{'biblionumber'},'a',($itm->{'biblioitemnumber'}));
+	warn "fee found:".$fee;
     $fee = sprintf "%.02f", $fee;
+	warn "fee found again:".$fee;
     $itm->{'reservefee'} = $fee;
     my $pty = $itm->{'publictype'};
     $itemtypes{$itm->{'itemtype'}} = $itm;
@@ -206,12 +208,16 @@
 		$proceed = 1;
 	} elsif ($query->param('all')) {
 		$template->param(all => 1);
-		$fee = 1;
+		# No idea why fee would be set to 1 ... it's supposed to be a monetary value, not a flag
+		# -- JF
+		#$fee = 1;
 		$proceed = 1;
 	}
 	if ($proceed && $branch) {
 		$fee = sprintf "%.02f", $fee;
+		if ($fee > 1) {
 		$template->param(fee => $fee,istherefee => $fee>0?1:0);
+		}
 		$template->param(item_types_selected => 1);
 		warn "Branch is ==$branch==";
 		$template->param(no_branch_selected => 1) unless ($branch!='');





More information about the Koha-cvs mailing list