[freeside-commits] freeside/bin countdeclines,NONE,1.1

Ivan,,, ivan at wavetail.420.am
Tue Mar 24 02:42:15 PDT 2009


Update of /home/cvs/cvsroot/freeside/bin
In directory wavetail.420.am:/tmp/cvs-serv5080

Added Files:
	countdeclines 
Log Message:
quick tool for RT#3843

--- NEW FILE: countdeclines ---
#!/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;
  }
}



More information about the freeside-commits mailing list