summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorJonathan Prykop <jonathan@freeside.biz>2016-01-28 15:42:43 -0600
committerJonathan Prykop <jonathan@freeside.biz>2016-01-28 19:26:52 -0600
commit488d3c15c9aaea2a17826600ee332f0af9b0634d (patch)
tree84b4abdcc71041ee57ba3f7ca4c9d6285ade7170 /httemplate
parente96bcf25f1d6eb21bb78b9c43bd00049840d9639 (diff)
RT#39638: VoIP Usage cost reporting [bug fixes/cleanup]
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/elements/menu.html4
-rw-r--r--httemplate/search/customer_cdr_profit.html (renamed from httemplate/search/customer_usage_profit.html)7
-rwxr-xr-xhttemplate/search/report_customer_cdr_profit.html (renamed from httemplate/search/report_customer_usage_profit.html)7
3 files changed, 10 insertions, 8 deletions
diff --git a/httemplate/elements/menu.html b/httemplate/elements/menu.html
index 1d5789d04..13478e979 100644
--- a/httemplate/elements/menu.html
+++ b/httemplate/elements/menu.html
@@ -290,6 +290,8 @@ $report_rating{'Call Detail Records (CDRs)'} = [ $fsurl.'search/report_cdr.html'
if $curuser->access_right("Usage: Call Detail Records (CDRs)");
$report_rating{'Unrateable CDRs'} = [ $fsurl.'search/cdr.html?freesidestatus=failed;cdrbatchnum=_ALL_' ]
if $curuser->access_right("Usage: Unrateable CDRs");
+$report_rating{'Customer CDRs Profit/Loss'} = [ $fsurl.'search/report_customer_cdr_profit.html', 'Profit/loss from customer CDRs' ]
+ if $curuser->access_right('Financial reports');
if ( $curuser->access_right("Usage: Time worked") ) {
$report_rating{'Time worked'} = [ $fsurl.'search/report_rt_transaction.html', '' ];
$report_rating{'Time worked summary per ticket'} = [ $fsurl.'search/report_rt_ticket.html', '' ];
@@ -398,8 +400,6 @@ if( $curuser->access_right('Financial reports') ) {
$report_financial{'Customer Accounting Summary'} = [ $fsurl.'search/report_customer_accounting_summary.html', 'Customer accounting summary report' ];
- $report_financial{'Customer Usage Profit/Loss'} = [ $fsurl.'search/report_customer_usage_profit.html', 'Customer usage profit/loss' ];
-
} elsif($curuser->access_right('Receivables report')) {
$report_financial{'A/R Aging'} = [ $fsurl.'search/report_receivables.html', 'Accounts Receivable Aging report' ];
diff --git a/httemplate/search/customer_usage_profit.html b/httemplate/search/customer_cdr_profit.html
index 9fcc92259..8dc06636a 100644
--- a/httemplate/search/customer_usage_profit.html
+++ b/httemplate/search/customer_cdr_profit.html
@@ -67,7 +67,7 @@
#warn "writing ".xl_rowcol_to_cell($r, $c)."\n";
$worksheet->write( $r, $c, $cell->{value}, $format{$f} );
}
- $c++;
+ $c += $cell->{colspan} || 1;
} #$cell
$r++;
} #$row
@@ -119,7 +119,8 @@ as <A HREF="<% "$myself;_type=xls" %>">Excel spreadsheet</A>
<%init>
die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right('Financial reports');
+ unless $FS::CurrentUser::CurrentUser->access_right('Financial reports')
+ && $FS::CurrentUser::CurrentUser->access_right('List rating data');
my ($agentnum,$sel_agent);
if ( $cgi->param('agentnum') =~ /^(\d+)$/ ) {
@@ -129,7 +130,7 @@ if ( $cgi->param('agentnum') =~ /^(\d+)$/ ) {
}
my $title = $sel_agent ? $sel_agent->agent.' ' : '';
-$title .= 'Customer Usage Profit/Loss Report';
+$title .= 'Customer CDRs Profit/Loss Report';
my @items = ('cust_bill_pkg_recur', 'cust_bill_pkg_recur', 'cust_bill_pkg_detail', 'cust_bill_pkg_detail' );
my @params = ( [], [ 'cost' => 1 ], [], [ 'cost' => 1 ] );
diff --git a/httemplate/search/report_customer_usage_profit.html b/httemplate/search/report_customer_cdr_profit.html
index f16489b99..2a5efc3eb 100755
--- a/httemplate/search/report_customer_usage_profit.html
+++ b/httemplate/search/report_customer_cdr_profit.html
@@ -1,6 +1,6 @@
-<% include('/elements/header.html', 'Customer Usage Profit/Loss Report' ) %>
+<% include('/elements/header.html', 'Customer CDRs Profit/Loss Report' ) %>
-<FORM ACTION="customer_usage_profit.html" METHOD="GET">
+<FORM ACTION="customer_cdr_profit.html" METHOD="GET">
<TABLE BGCOLOR="#cccccc" CELLSPACING=0>
@@ -24,6 +24,7 @@
<%init>
die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right('Financial reports');
+ unless $FS::CurrentUser::CurrentUser->access_right('Financial reports')
+ && $FS::CurrentUser::CurrentUser->access_right('List rating data');
</%init>