projects
/
koha.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e5d8bf5
)
disallow division by zero in hold ratio report
author
Galen Charlton
<galen.charlton@liblime.com>
Tue, 1 Apr 2008 17:01:03 +0000
(12:01 -0500)
committer
Joshua Ferraro
<jmf@liblime.com>
Thu, 3 Apr 2008 19:42:13 +0000
(14:42 -0500)
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
circ/reserveratios.pl
patch
|
blob
|
history
diff --git
a/circ/reserveratios.pl
b/circ/reserveratios.pl
index
2ec48eb
..
b45bab0
100755
(executable)
--- a/
circ/reserveratios.pl
+++ b/
circ/reserveratios.pl
@@
-90,9
+90,12
@@
if (!defined($startdate) or $startdate eq "") {
if (!defined($enddate) or $enddate eq "") {
$enddate = format_date($todaysdate);
}
-if (!defined($ratio) or $ratio eq "") {
+if (!defined($ratio) or $ratio eq ""
or $ratio !~ /^\s*\d+\s*$/
) {
$ratio = 3;
}
+if ($ratio == 0) {
+ $ratio = 1; # prevent division by zero
+}
my $dbh = C4::Context->dbh;
my ($sqlorderby, $sqldatewhere) = ("","");