X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fgraph%2Fcust_bill_pkg.cgi;h=91bedf3fe642b2b1df808840636fbe8b6ba2dc23;hb=055ca451ae55f5deec95ce113d3dd648c9cc9b49;hp=c334ae9e7b92790fcafa4b13e6417c5733f1383c;hpb=0af38652da3b3be7da2d35b048285ef6f2194e1a;p=freeside.git diff --git a/httemplate/graph/cust_bill_pkg.cgi b/httemplate/graph/cust_bill_pkg.cgi index c334ae9e7..91bedf3fe 100644 --- 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, + 'cust_classnum'=> \@cust_classnums, ) %> <%init> @@ -68,6 +69,9 @@ $title .= $sel_part_referral->referral.' ' $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 @@ -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;"). + (join('',map {"cust_classnum=$_;"} @cust_classnums)). ($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, + 'cust_classnum' => \@cust_classnums, '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 .= ";cust_classnum=$_" foreach @cust_classnums; + push @items, 'cust_bill_pkg'; push @labels, mt('[_1] - Subtotal', $agent->agent); push @params, \@row_params;