[freeside-commits] branch FREESIDE_3_BRANCH updated. 8a20eb962b913cbe9e23fca078a4d9c6696db594
Mark Wells
mark at 420.am
Wed Apr 30 17:12:34 PDT 2014
The branch, FREESIDE_3_BRANCH has been updated
via 8a20eb962b913cbe9e23fca078a4d9c6696db594 (commit)
from 58a0db634098b684ea8118822b6586deb99e214d (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 8a20eb962b913cbe9e23fca078a4d9c6696db594
Author: Mark Wells <mark at freeside.biz>
Date: Wed Apr 30 17:12:13 2014 -0700
in selfservice display of phone usage, avoid double-counting calls to tollfree numbers, #27186
diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm
index 71df0ef..81bc7a5 100644
--- a/FS/FS/ClientAPI/MyAccount.pm
+++ b/FS/FS/ClientAPI/MyAccount.pm
@@ -1816,6 +1816,7 @@ sub list_svcs {
'inbound' => ( $_ eq 'inbound' ? 1 : 0 ),
'begin' => ($cust_pkg->last_bill || 0),
'nonzero' => 1,
+ 'disable_charged_party' => 1,
);
$hash{$_} = $sum_cdr->hashref;
}
@@ -2099,7 +2100,12 @@ sub _list_cdr_usage {
# we have to return the results all at once...
my($svc_phone, $begin, $end, %opt) = @_;
map [ $_->downstream_csv(%opt, 'keeparray' => 1) ],
- $svc_phone->get_cdrs( 'begin'=>$begin, 'end'=>$end, %opt );
+ $svc_phone->get_cdrs(
+ 'begin'=>$begin,
+ 'end'=>$end,
+ 'disable_charged_party' => 1,
+ %opt
+ );
}
sub list_cdr_usage {
diff --git a/FS/FS/svc_phone.pm b/FS/FS/svc_phone.pm
index 0b77a71..0677688 100644
--- a/FS/FS/svc_phone.pm
+++ b/FS/FS/svc_phone.pm
@@ -730,8 +730,8 @@ Accepts the following options:
=item status => "" (or "processing-tiered", "done"): Return only CDRs with that processing status.
-=item inbound => 1: Return CDRs for inbound calls. With "status", will filter
-on inbound processing status.
+=item inbound => 1: Return CDRs for inbound calls (that is, those that match
+on 'dst'). With "status", will filter on inbound processing status.
=item default_prefix => "XXX": Also accept the phone number of the service prepended
with the chosen prefix.
@@ -742,7 +742,9 @@ with the chosen prefix.
=item calltypenum: Only return CDRs with this call type.
-=item disable_src => 1: Only match on "charged_party", not "src".
+=item disable_src => 1: Only match on 'charged_party', not 'src'.
+
+=item disable_charged_party => 1: Only match on 'src', not 'charged_party'.
=item nonzero: Only return CDRs where duration > 0.
@@ -782,8 +784,8 @@ sub psearch_cdrs {
} else {
- @fields = ( 'charged_party' );
- push @fields, 'src' if !$options{'disable_src'};
+ push @fields, 'charged_party' unless $options{'disable_charged_party'};
+ push @fields, 'src' unless $options{'disable_src'};
$hash{'freesidestatus'} = $options{'status'}
if exists($options{'status'});
}
-----------------------------------------------------------------------
Summary of changes:
FS/FS/ClientAPI/MyAccount.pm | 8 +++++++-
FS/FS/svc_phone.pm | 12 +++++++-----
2 files changed, 14 insertions(+), 6 deletions(-)
More information about the freeside-commits
mailing list