[freeside-commits] branch FREESIDE_3_BRANCH updated. f064b8593fa93cd8c55618c63d6bba4a0c542cbf
Mark Wells
mark at 420.am
Wed Apr 30 17:32:46 PDT 2014
The branch, FREESIDE_3_BRANCH has been updated
via f064b8593fa93cd8c55618c63d6bba4a0c542cbf (commit)
from 8a20eb962b913cbe9e23fca078a4d9c6696db594 (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 f064b8593fa93cd8c55618c63d6bba4a0c542cbf
Author: Mark Wells <mark at freeside.biz>
Date: Wed Apr 30 17:32:31 2014 -0700
option to hide CDR price in selfservice, #27186
diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm
index 81bc7a5..5b590da 100644
--- a/FS/FS/ClientAPI/MyAccount.pm
+++ b/FS/FS/ClientAPI/MyAccount.pm
@@ -2117,6 +2117,7 @@ sub list_cdr_usage {
sub _usage_details {
my($callback, $p, %opt) = @_;
+ my $conf = FS::Conf->new;
my($context, $session, $custnum) = _custoragent_session_custnum($p);
return { 'error' => $session } if $context eq 'error';
@@ -2135,7 +2136,6 @@ sub _usage_details {
my %callback_opt;
my $header = [];
if ( $svcdb eq 'svc_phone' ) {
- my $conf = FS::Conf->new;
my $format = '';
if ( $p->{inbound} ) {
$format = $cust_pkg->part_pkg->option('selfservice_inbound_format')
@@ -2169,6 +2169,14 @@ sub _usage_details {
%callback_opt
);
+ if ( $conf->exists('selfservice-hide_cdr_price') ) {
+ # ugly kludge, I know
+ my ($delete_col) = grep { $header->[$_] eq 'Price' } (0..scalar(@$header));
+ if (defined $delete_col) {
+ delete($_->[$delete_col]) foreach ($header, @usage);
+ }
+ }
+
#kinda false laziness with FS::cust_main::bill, but perhaps
#we should really change this bit to DateTime and DateTime::Duration
#
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index 8eeec0b..d9a13fe 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -5589,6 +5589,13 @@ and customer address. Include units.',
},
{
+ 'key' => 'selfservice-hide_cdr_price',
+ 'section' => 'self-service',
+ 'description' => 'Don\'t show the "Price" column on CDRs in self-service.',
+ 'type' => 'checkbox',
+ },
+
+ {
'key' => 'logout-timeout',
'section' => 'UI',
'description' => 'If set, automatically log users out of the backoffice after this many minutes.',
-----------------------------------------------------------------------
Summary of changes:
FS/FS/ClientAPI/MyAccount.pm | 10 +++++++++-
FS/FS/Conf.pm | 7 +++++++
2 files changed, 16 insertions(+), 1 deletions(-)
More information about the freeside-commits
mailing list