From 8f102e54c42d8999634e91e09e895db9785ed815 Mon Sep 17 00:00:00 2001 From: Brett Smith Date: Thu, 26 Jan 2017 13:59:29 -0500 Subject: [PATCH] send-renewal-notices: Fix lapse rate math. The lapse rate by Supporter type was being miscalculated. --- scripts/send-renewal-notices.plx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/send-renewal-notices.plx b/scripts/send-renewal-notices.plx index 1c06b34..8883045 100644 --- a/scripts/send-renewal-notices.plx +++ b/scripts/send-renewal-notices.plx @@ -205,7 +205,7 @@ my $headerInfo = "$subject\n" . ("=" x length($subject)) . foreach my $type (keys %lapsedCounter) { $headerInfo .= sprintf("%7s: Lapsed Count: %3d Active Count: %3d Percent of %7ss Lapsed: %2.2f%\n", - $type, $lapsedCounter{$type}, $activeCounter{$type}, ($lapsedCounter{$type} / $activeCounter{$type}) * 100.00); + $type, $lapsedCounter{$type}, $activeCounter{$type}, ($lapsedCounter{$type} / ($lapsedCounter{$type} + $activeCounter{$type})) * 100.00); } $headerInfo .= "\n"; my $emailText .= $headerInfo;