X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fsearch%2Freport_cust_pkg.html;h=dd62f3ead958c14030041170abd575cce169e792;hp=98e91217f318310644ab0f7436d7b650ae55b108;hb=eb4ff7f73c5d4bdf74a3472448b5a195598ff4cd;hpb=6b12c14cc10503d6b0783e8ef71fe44d9a9b37b6 diff --git a/httemplate/search/report_cust_pkg.html b/httemplate/search/report_cust_pkg.html index 98e91217f..dd62f3ead 100755 --- a/httemplate/search/report_cust_pkg.html +++ b/httemplate/search/report_cust_pkg.html @@ -1,4 +1,4 @@ -<%= include('/elements/header.html', 'Package Report' ) %> +<% include('/elements/header.html', 'Package Report' ) %>
@@ -8,26 +8,85 @@ Search options - <%= include( '/elements/tr-select-agent.html', - $cgi->param('agentnum'), + <% include( '/elements/tr-select-agent.html', + 'curr_value' => scalar( $cgi->param('agentnum') ), ) %> - <%= include( '/elements/tr-select-cust_pkg-status.html' ) %> - <%= include( '/elements/tr-select-pkg_class.html', '', + + <% include( '/elements/tr-select-cust_pkg-status.html', + 'onchange' => 'status_changed(this);', + ) + %> + + + + <% include( '/elements/tr-select-pkg_class.html', 'pre_options' => [ '0' => 'all' ], 'empty_label' => '(empty class)', ) %> - <% #include( '/elements/tr-selectmultiple-part_pkg.html' ) %> - - Next bill date - - - <%= include( '/elements/tr-input-beginning_ending.html' ) %> -
- - + +% foreach my $field (qw( setup last_bill bill adjourn susp expire cancel )) { + + + <% $label{$field} %> + + + <% include( '/elements/tr-input-beginning_ending.html', + prefix => $field, + layout => 'horiz', + ) + %> +
+ + + +% } + <% include( '/elements/tr-selectmultiple-part_pkg.html' ) %> +   @@ -35,7 +94,7 @@ Display options - <%= include( '/elements/tr-select-cust-fields.html' ) %> + <% include( '/elements/tr-select-cust-fields.html' ) %> @@ -44,4 +103,43 @@
-<%= include('/elements/footer.html') %> +<% include('/elements/footer.html') %> +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('List packages'); + + +<%once> + +my %label = ( + 'setup' => 'Setup', + 'last_bill' => 'Last bill', + 'bill' => 'Next bill', + 'adjourn' => 'Adjourns', + 'susp' => 'Suspended', + 'expire' => 'Expires', + 'cancel' => 'Cancelled', +); + +#false laziness w/cust_pkg.cgi +my %disable = ( + 'all' => {}, + 'one-time charge' => { 'last_bill'=>1, 'bill'=>1, 'adjourn'=>1, 'susp'=>1, 'expire'=>1, 'cancel'=>1, }, + 'active' => { 'susp'=>1, 'cancel'=>1 }, + 'suspended' => { 'cancel' => 1 }, + 'cancelled' => {}, + '' => {}, +); + +#hmm? +my %checkbox = ( + 'setup' => 0, + 'last_bill' => 0, + 'bill' => 0, + 'susp' => 1, + 'expire' => 1, + 'cancel' => 1, +); + +