X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fsearch%2Freport_cust_pkg.html;h=dd62f3ead958c14030041170abd575cce169e792;hp=8fabf107a29867096f85e22ecc29f13e210fce6a;hb=eb4ff7f73c5d4bdf74a3472448b5a195598ff4cd;hpb=3ce7691203a7737406bf2d4442f7fd84b81f847e diff --git a/httemplate/search/report_cust_pkg.html b/httemplate/search/report_cust_pkg.html index 8fabf107a..dd62f3ead 100755 --- a/httemplate/search/report_cust_pkg.html +++ b/httemplate/search/report_cust_pkg.html @@ -9,26 +9,84 @@ Search options <% include( '/elements/tr-select-agent.html', - $cgi->param('agentnum'), + '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' ) %> +   @@ -46,3 +104,42 @@ <% 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, +); + +