[Koha-cvs] koha/admin issuingrules.pl [rel_2_2]

Henri-Damien LAURENT laurenthdl at alinto.com
Fri Oct 6 15:27:57 CEST 2006


CVSROOT:	/sources/koha
Module name:	koha
Branch:		rel_2_2
Changes by:	Henri-Damien LAURENT <hdl>	06/10/06 13:27:57

Modified files:
	admin          : issuingrules.pl 

Log message:
	Making out a difference between NULL values and 0 values in issuing rules.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/admin/issuingrules.pl?cvsroot=koha&only_with_tag=rel_2_2&r1=1.3.2.5&r2=1.3.2.6

Patches:
Index: issuingrules.pl
===================================================================
RCS file: /sources/koha/koha/admin/issuingrules.pl,v
retrieving revision 1.3.2.5
retrieving revision 1.3.2.6
diff -u -b -r1.3.2.5 -r1.3.2.6
--- issuingrules.pl	5 Feb 2006 21:59:21 -0000	1.3.2.5
+++ issuingrules.pl	6 Oct 2006 13:27:57 -0000	1.3.2.6
@@ -155,14 +155,14 @@
 		$sth2->execute($branch,$trow3[$i],$$data->{'itemtype'});
 		my $dat=$sth2->fetchrow_hashref;
 		$sth2->finish;
-		my $fine=$dat->{'fine'}+0;
-		my $maxissueqty = $dat->{'maxissueqty'}+0;
-		my $issuelength = $dat->{'issuelength'}+0;
+		my $fine=$dat->{'fine'};
+		my $maxissueqty = $dat->{'maxissueqty'};
+		my $issuelength = $dat->{'issuelength'};
 		my $finesvalue;
-		$finesvalue= "$fine,$dat->{'firstremind'},$dat->{'chargeperiod'}" if $fine+$dat->{'firstremind'}+$dat->{'chargeperiod'}>0;
+		$finesvalue= "$fine,$dat->{'firstremind'},$dat->{'chargeperiod'}" unless ($dat->{'fine'} eq undef);
 		my $issuingvalue;
 # 		if ($maxissueqty>0) {
-		    $issuingvalue = "$issuelength,$maxissueqty" if $issuelength+$maxissueqty>0;
+		    $issuingvalue = "$issuelength,$maxissueqty" unless ($dat->{'maxissueqty'} eq undef or $dat->{'maxissueqty'} eq undef);
 # 		}
 # 		else {		
 # 		    $issuingvalue = "$issuelength, 5";





More information about the Koha-cvs mailing list