projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
handle CCH maxtype = 1 taxes, RT#19150
[freeside.git]
/
FS
/
FS
/
detail_format
/
sum_duration_prefix.pm
diff --git
a/FS/FS/detail_format/sum_duration_prefix.pm
b/FS/FS/detail_format/sum_duration_prefix.pm
index
0459041
..
cd7bbe3
100644
(file)
--- a/
FS/FS/detail_format/sum_duration_prefix.pm
+++ b/
FS/FS/detail_format/sum_duration_prefix.pm
@@
-25,7
+25,10
@@
sub append {
my $self = shift;
my $prefixes = ($self->{prefixes} ||= {});
foreach my $cdr (@_) {
my $self = shift;
my $prefixes = ($self->{prefixes} ||= {});
foreach my $cdr (@_) {
- my $phonenum = $self->{inbound} ? $cdr->src : $cdr->dst;
+ my (undef, $phonenum) = $cdr->parse_number(
+ column => ( $self->{inbound} ? 'src' : 'dst' ),
+ );
+
$phonenum =~ /^(\d{$prefix_length})/;
my $prefix = $1 || 'other';
warn "$me appending ".$cdr->dst." to $prefix\n" if $DEBUG;
$phonenum =~ /^(\d{$prefix_length})/;
my $prefix = $1 || 'other';
warn "$me appending ".$cdr->dst." to $prefix\n" if $DEBUG;