X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fgraph%2Freport_cust_bill_pkg.html;h=96bfdc09afab6aebc6b8e0de8b0592c410037e96;hp=be5a71a7a3a5adda7971fbc3879b48d792f07474;hb=b71b1576c68bc40ad26592b354feace37a029f0e;hpb=eb4ff7f73c5d4bdf74a3472448b5a195598ff4cd diff --git a/httemplate/graph/report_cust_bill_pkg.html b/httemplate/graph/report_cust_bill_pkg.html index be5a71a7a..96bfdc09a 100644 --- a/httemplate/graph/report_cust_bill_pkg.html +++ b/httemplate/graph/report_cust_bill_pkg.html @@ -1,18 +1,177 @@ -<% include('/elements/header.html', 'Sales Report' ) %> +<& /elements/header.html, + { title => 'Sales Report', + head => ' + + + ', + } +&> -
+ - +
+ + + + <% include('/elements/tr-select-from_to.html' ) %> -<% include('/elements/tr-select-agent.html', '', 'label' => 'For agent: ' ) %> + + + + + + + +<& /elements/tr-select-agent.html, + 'field' => 'agentnum', + 'label' => 'Agent ', + 'disable_empty' => 0, + 'pre_options' => [ 'all' => 'all (aggregate)' ], + 'empty_label' => 'all (breakdown)', + 'onchange' => 'agent_changed', +&> -<% include('/elements/tr-select-pkg_class.html', - 'pre_options' => [ '0' => 'all' ], - 'empty_label' => '(empty class)', - ) -%> +<& /elements/tr-select-cust_class.html, + 'field' => 'cust_classnum', + 'label' => 'Customer class', + 'multiple' => 1, +&> + +<& /elements/tr-select-part_referral.html, + 'field' => 'refnum', + 'label' => 'Advertising source ', + 'disable_empty' => 0, + 'pre_options' => [ 'all' => 'all (aggregate)' ], + 'empty_label' => 'all (breakdown)', + 'onchange' => 'enable_agent_totals' +&> + + + + + + + + + + + + + + + + +% foreach ( qw(Setup Usage) ) { +<& /elements/tr-select.html, + 'label' => "$_ fees", + 'field' => 'use_'.lc($_), + 'options' => [ 0, 1, 2 ], + 'labels' => { 0 => 'Combine', 1 => 'Separate', 2 => 'Do not show' }, + 'onchange'=> 'enable_agent_totals', +&> +% } +<& /elements/tr-select.html, + 'label' => 'Discounts', + 'field' => 'use_discount', + 'options' => [ 1, 2 ], + 'labels' => { 1 => 'Separate', 2 => 'Do not show' }, +&> +<& /elements/tr-select.html, + 'label' => 'Taxes', + 'field' => 'use_taxes', + 'options' => [ 1, 2 ], + 'labels' => { 1 => 'Separate', 2 => 'Do not show' }, +&> + + + + + + + + + + + + + + + + + + + + + + + + + + + +
<% mt('Search options') |h %>
Show projected data for future months
+ + <% emt('Package class') %> +
+ + <% emt('Report class') %> +
+ + + + + + + + +
+
+ <& /elements/select-pkg_class.html, + 'field' => 'classnum', + 'multiple' => 1, + 'all_selected' => 1, + 'pre_options' => [ #'all' => 'all (aggregate)', + # '' => 'all (breakdown)', + '0' => '(empty class)' ], + 'disable_empty' => 1, + 'onchange' => 'enable_agent_totals', + &> +
+ +
+ + <% emt('Aggregate') %> +
+ + <% emt('Breakdown') %> +
+ +
+
 
<% mt('Display options') |h %>
Colors +% my @names = (); +% +% #no particular long-term attachment to this, just trying to replicate +% # historical behavior so people's graphs don't change color suddenly in 3.x +% my $hue = 0; +% my $hue_increment = 125; + + +% my $anum = 0; +% foreach my $agent ( @agents ) { + + ID="agent<%$anum%>-colors" + > + + + +% $anum++; +% $hue += $hue_increment; +% } +
+ ID="agent<%$anum%>-label" + > + <% $agent->agent |h %> + +% my $col_scheme = Color::Scheme->new +% ->from_hue($hue) #->from_hex($agent->color) +% ->scheme('analogic') +% ; +% +% my $cnum = 0; +% my @colors = ($col_scheme->colors)[ 0,4,8,1,5,9 ];#again some some random historical shite +% for (@colors) { +% my $name = "agent$anum-color$cnum"; +% push @names, $name; +% $cnum++; + +% } +
+
Show per-agent subtotals
Separate sub-packages from parents
Average per customer package
Distribute recurring fees over billing period

@@ -32,4 +291,6 @@ die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Financial reports'); +my @agents = $FS::CurrentUser::CurrentUser->agents; +