summaryrefslogtreecommitdiff
path: root/bin/countdeclines
diff options
context:
space:
mode:
authorcvs2git <cvs2git>2009-10-11 02:42:17 +0000
committercvs2git <cvs2git>2009-10-11 02:42:17 +0000
commita83a000a027d1272e813259d09230d701d84df64 (patch)
tree71500c957e6d7db3e1ad3d59e74ca7bbb14e44ff /bin/countdeclines
parent097a12385d80ef52f37d4cc2bb93bc3f81e6f8e6 (diff)
parent0b69c091543b56a45f2ae6b8718fc67f381a6686 (diff)
This commit was manufactured by cvs2svn to create branchfreeside_1_9_1
'FREESIDE_1_9_BRANCH'.
Diffstat (limited to 'bin/countdeclines')
-rwxr-xr-xbin/countdeclines22
1 files changed, 22 insertions, 0 deletions
diff --git a/bin/countdeclines b/bin/countdeclines
new file mode 100755
index 000000000..bbc392560
--- /dev/null
+++ b/bin/countdeclines
@@ -0,0 +1,22 @@
+#!/usr/bin/perl
+
+use Date::Parse;
+
+my $e = 'PlugnPay error: 97: Declined for CVV failure';
+my @y = (2008,2009);
+
+my $p = 0;
+
+foreach my $y (@y) {
+ foreach my $m (1..12) {
+ my $d = "$m/1/$y";
+ my $t = str2time($d);
+
+ #print "$pd-$d: SELECT count(*) from cust_bill_event where statustext = '$e' and _date >= $p and _date < $t;\n"
+ print "SELECT count(*) from cust_bill_event where statustext = '$e' and _date >= $p and _date < $t;\n"
+ if $p;
+
+ $p = $t;
+ $pd = $d;
+ }
+}