[freeside-commits] branch master updated. 7c82d6a5b0d722a3838875d3641a039bc3fc991b

Ivan ivan at 420.am
Mon Nov 3 19:09:12 PST 2014


The branch, master has been updated
       via  7c82d6a5b0d722a3838875d3641a039bc3fc991b (commit)
      from  2a68fb7632bce93843dce65fcc581e7dbf840d67 (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 7c82d6a5b0d722a3838875d3641a039bc3fc991b
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Mon Nov 3 19:09:11 2014 -0800

    fix customer CDR search links for non-NANPA countries, RT#31928

diff --git a/httemplate/search/report_cdr.html b/httemplate/search/report_cdr.html
index fe840ea..0eefd4c 100644
--- a/httemplate/search/report_cdr.html
+++ b/httemplate/search/report_cdr.html
@@ -190,6 +190,10 @@ die "access denied"
 my @fields = fields('cdr');
 my $labels = FS::cdr->table_info->{'fields'};
 
+my $conf = new FS::Conf;
+my $default_phone_countrycode =
+  $conf->config('default_phone_countrycode') || '1';
+
 #XXX config
 my @show_default = qw(
   calldate clid src dst dcontext charged_party
@@ -222,7 +226,7 @@ if ( $cgi->param('custnum') =~ /^(\d+)$/ ) {
   });
   die "Customer not found!" unless $cust_main;
 
-  #historical?
+  #historical packages?  It would help, it was still usage, it happened
   foreach my $cust_pkg ( $cust_main->ncancelled_pkgs ) {
 
     my @voip_pkgs =
@@ -247,7 +251,7 @@ if ( $cgi->param('custnum') =~ /^(\d+)$/ ) {
       my @numbers = map {
                           my $number = $_->phonenum;
                           $number = $_->countrycode. $number
-                            unless $_->countrycode eq '1';
+                           unless $_->countrycode eq $default_phone_countrycode;
                           $number;
                         }
                       @svc_phone;

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

Summary of changes:
 httemplate/search/report_cdr.html |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list