[freeside-commits] freeside/FS/FS/part_pkg voip_cdr.pm, 1.128, 1.129

Mark Wells mark at wavetail.420.am
Sat Dec 10 14:20:40 PST 2011


Update of /home/cvs/cvsroot/freeside/FS/FS/part_pkg
In directory wavetail.420.am:/tmp/cvs-serv27979/FS/FS/part_pkg

Modified Files:
	voip_cdr.pm 
Log Message:
revert ignore_unrateable behavior change

Index: voip_cdr.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/voip_cdr.pm,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -w -d -r1.128 -r1.129
--- voip_cdr.pm	10 Dec 2011 00:58:15 -0000	1.128
+++ voip_cdr.pm	10 Dec 2011 22:20:37 -0000	1.129
@@ -43,11 +43,11 @@
 
 tie my %granularity, 'Tie::IxHash', FS::rate_detail::granularities();
 
-# previously "1" was "ignore 
+# previously "1" was "ignore"
 tie my %unrateable_opts, 'Tie::IxHash',
   ''  => 'Exit with a fatal error',
-  1   => 'Flag for later review',
-  2   => 'Ignore and continue',
+  1  => 'Ignore and continue',
+  2  => 'Flag for later review',
 ;
 
 %info = (
@@ -646,11 +646,6 @@
       if ( ! $rate_detail && $charge eq '' ) {
 
         if ( $ignore_unrateable == 2 ) {
-          # throw a warning--not recommended
-          warn "no rate_detail found for CDR.acctid: ". $cdr->acctid.
-               "; skipping\n"
-        }
-        else {
           # mark the CDR as unrateable
           my $error = $cdr->set_status_and_rated_price(
             'failed',
@@ -658,6 +653,11 @@
             $cust_svc->svcnum
           );
           die $error if $error;
+        }
+        elsif ( $ignore_unrateable == 1 ) {
+          # warn and continue
+          warn "no rate_detail found for CDR.acctid: ". $cdr->acctid.
+               "; skipping\n"
         }#if $ignore_unrateable
 
       } else { # there *is* a rate_detail (or call_details), proceed...



More information about the freeside-commits mailing list