projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
filter by customer class on all financial reports, #20573
[freeside.git]
/
httemplate
/
graph
/
cust_bill_pkg.cgi
diff --git
a/httemplate/graph/cust_bill_pkg.cgi
b/httemplate/graph/cust_bill_pkg.cgi
index
c334ae9
..
91bedf3
100644
(file)
--- a/
httemplate/graph/cust_bill_pkg.cgi
+++ b/
httemplate/graph/cust_bill_pkg.cgi
@@
-13,6
+13,7
@@
'bottom_total' => 1,
'bottom_link' => $bottom_link,
'agentnum' => $agentnum,
'bottom_total' => 1,
'bottom_link' => $bottom_link,
'agentnum' => $agentnum,
+ 'cust_classnum'=> \@cust_classnums,
)
%>
<%init>
)
%>
<%init>
@@
-68,6
+69,9
@@
$title .= $sel_part_referral->referral.' '
$title .= 'Sales Report (Gross)';
$title .= ', average per customer package' if $average_per_cust_pkg;
$title .= 'Sales Report (Gross)';
$title .= ', average per customer package' if $average_per_cust_pkg;
+my @cust_classnums = grep /^\d+$/, $cgi->param('cust_classnum');
+$bottom_link .= "cust_classnum=$_;" foreach @cust_classnums;
+
#classnum (here)
# 0: all classes
# not specified: empty class
#classnum (here)
# 0: all classes
# not specified: empty class
@@
-188,6
+192,7
@@
foreach my $agent ( $all_agent || $sel_agent || qsearch('agent', { 'disabled' =>
push @links, "$link;".
($all_agent ? '' : "agentnum=$row_agentnum;").
($all_part_referral ? '' : "refnum=$row_refnum;").
push @links, "$link;".
($all_agent ? '' : "agentnum=$row_agentnum;").
($all_part_referral ? '' : "refnum=$row_refnum;").
+ (join('',map {"cust_classnum=$_;"} @cust_classnums)).
($all_class ? '' : "classnum=$row_classnum;").
"distribute=$distribute;".
"use_override=$use_override;charges=$component;";
($all_class ? '' : "classnum=$row_classnum;").
"distribute=$distribute;".
"use_override=$use_override;charges=$component;";
@@
-209,6
+214,7
@@
foreach my $agent ( $all_agent || $sel_agent || qsearch('agent', { 'disabled' =>
my $component = join('', @components);
my @row_params = ( 'agentnum' => $row_agentnum,
my $component = join('', @components);
my @row_params = ( 'agentnum' => $row_agentnum,
+ 'cust_classnum' => \@cust_classnums,
'use_override' => $use_override,
'average_per_cust_pkg' => $average_per_cust_pkg,
'distribute' => $distribute,
'use_override' => $use_override,
'average_per_cust_pkg' => $average_per_cust_pkg,
'distribute' => $distribute,
@@
-231,6
+237,8
@@
foreach my $agent ( $all_agent || $sel_agent || qsearch('agent', { 'disabled' =>
$row_link .= ";refnum=".$sel_part_referral->refnum;
}
$row_link .= ";refnum=".$sel_part_referral->refnum;
}
+ $row_link .= ";cust_classnum=$_" foreach @cust_classnums;
+
push @items, 'cust_bill_pkg';
push @labels, mt('[_1] - Subtotal', $agent->agent);
push @params, \@row_params;
push @items, 'cust_bill_pkg';
push @labels, mt('[_1] - Subtotal', $agent->agent);
push @params, \@row_params;