diff options
| author | ivan <ivan> | 2007-08-01 22:26:52 +0000 |
|---|---|---|
| committer | ivan <ivan> | 2007-08-01 22:26:52 +0000 |
| commit | eb4ff7f73c5d4bdf74a3472448b5a195598ff4cd (patch) | |
| tree | bb38241e8c865c3bca861da7749071feeadd2b5b /httemplate/search/cust_bill_event.cgi | |
| parent | 32b5d3a31f112a381f0a15ac5e3a2204242f3405 (diff) | |
event refactor, landing on HEAD!
Diffstat (limited to 'httemplate/search/cust_bill_event.cgi')
| -rw-r--r-- | httemplate/search/cust_bill_event.cgi | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/httemplate/search/cust_bill_event.cgi b/httemplate/search/cust_bill_event.cgi index ada7e4362..ffd95e976 100644 --- a/httemplate/search/cust_bill_event.cgi +++ b/httemplate/search/cust_bill_event.cgi @@ -64,8 +64,12 @@ %> <%init> +my $curuser = $FS::CurrentUser::CurrentUser; + die "access denied" - unless $FS::CurrentUser::CurrentUser->access_right('Billing event reports'); + unless $curuser->access_right('Billing event reports') + or $curuser->access_right('View customer billing events') + && $cgi->param('invnum') =~ /^(\d+)$/; my $title = $cgi->param('failed') ? 'Failed invoice events' @@ -93,6 +97,10 @@ if ( $cgi->param('part_bill_event.payby') =~ /^(\w+)$/ ) { push @search, "part_bill_event.payby = '$1'"; } +if ( $cgi->param('invnum') =~ /^(\d+)$/ ) { + push @search, "cust_bill_event.invnum = '$1'"; +} + #here is the agent virtualization push @search, $FS::CurrentUser::CurrentUser->agentnums_sql; @@ -123,7 +131,11 @@ my $conf = new FS::Conf; my $failed = $cgi->param('failed'); -my $html_init = join("\n", map { +my $html_init = ' + <FONT SIZE="+1">Invoice events are the deprecated, old-style actions taken o +n open invoices. See Reports->Billing events->Billing events for current event reports.</FONT><BR><BR>'; + +$html_init .= join("\n", map { ( my $action = $_ ) =~ s/_$//; include('/elements/progress-init.html', $_.'form', |
