[freeside-commits] branch FREESIDE_4_BRANCH updated. 7ae959357f323e55c9b9ee035b68bd605a2b17da

Ivan ivan at 420.am
Wed Jan 25 13:04:29 PST 2017


The branch, FREESIDE_4_BRANCH has been updated
       via  7ae959357f323e55c9b9ee035b68bd605a2b17da (commit)
      from  dbc1003640a2f9593c1465ec66bf9be3645b834b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 7ae959357f323e55c9b9ee035b68bd605a2b17da
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Jan 25 13:04:28 2017 -0800

    better diagnostics for un-pre-rate-able CDRs

diff --git a/FS/bin/freeside-cdrrated b/FS/bin/freeside-cdrrated
index 2966b2e..a8fcf51 100644
--- a/FS/bin/freeside-cdrrated
+++ b/FS/bin/freeside-cdrrated
@@ -82,6 +82,7 @@ while (1) {
       my $svc_phone = qsearchs('svc_phone', { 'phonenum' => $number } );
       unless ( $svc_phone ) {
         #XXX set freesideratestatus or something so we don't keep retrying?
+        warn "no phone number found for CDR ". $cdr->acctid. "\n";
         next;
       }
 
@@ -94,7 +95,8 @@ while (1) {
       my $cust_pkg = $svc_phone{$number}->cust_svc->cust_pkg;
       unless ( $cust_pkg ) {
         #XXX unlinked svc_phone?
-        # warn and also set freesideratestatus or somesuch?
+        # also set freesideratestatus or somesuch?
+        warn "no package found (unlinked phone number?) for CDR ". $cdr->acctid. "\n";
         next;
       }
 
@@ -124,6 +126,7 @@ while (1) {
         #XXX no package for this CDR
         # warn and also set freesideratestatus or somesuch?
         #  or at least warn
+        warn "no CDR rating package for CDR ". $cdr->acctid. "\n";
         next;
       } elsif ( scalar(@part_pkg) > 1 ) {
         warn "multiple package could rate CDR ". $cdr->acctid. "\n";
@@ -140,6 +143,7 @@ while (1) {
       #then we can't prerate this CDR
       #some sort of warning?
       # (sucks if you're depending on credit limit fraud warnings)
+      warn "package has min_included; can't prerate CDR ". $cdr->acctid. "\n";
       next;
     }
     
@@ -184,7 +188,7 @@ sub _shouldrun {
 }
 
 sub usage { 
-  die "Usage:\n\n  freeside-cdrrewrited user\n";
+  die "Usage:\n\n  freeside-cdrrated user\n";
 }
 
 =head1 NAME

-----------------------------------------------------------------------

Summary of changes:
 FS/bin/freeside-cdrrated |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list