summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2014-11-03 19:09:13 -0800
committerIvan Kohler <ivan@freeside.biz>2014-11-03 19:09:13 -0800
commit57cb7181a1b3f5fc768ab48876841be2b96542d2 (patch)
tree6b7cfedf80277a2c5f40103530f869e8b075e569
parenta43929f7410683d0fbd411f36c84d063b7384fe6 (diff)
fix customer CDR search links for non-NANPA countries, RT#31928
-rw-r--r--httemplate/search/report_cdr.html8
1 files changed, 6 insertions, 2 deletions
diff --git a/httemplate/search/report_cdr.html b/httemplate/search/report_cdr.html
index fe840ea0b..0eefd4ce7 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;