-%
-%my %search;
-%if ( $cgi->param('showdisabled') ) {
-% %search = ();
-%} else {
-% %search = ( 'disabled' => '' );
-%}
-%
-%my @part_bill_event = qsearch('part_bill_event', \%search );
-%my $total = scalar(@part_bill_event);
-%
-
+<% include('/elements/header.html', 'Invoice Event Listing') %>
-<% include("/elements/header.html",'Invoice Event Listing', menubar( 'Main Menu' => $p) ) %>
-
- Invoice events are actions taken on open invoices.<BR><BR>
+ <FONT SIZE="+1">Invoice events are the deprecated, old-style actions taken on open invoices. Any events still listed here should be migrated to new-style events.</FONT><BR><BR>
<A HREF="<% $p %>edit/part_bill_event.cgi"><I>Add a new invoice event</I></A>
<BR><BR>
% my $delay = duration_exact($part_bill_event->seconds);
% ( my $plandata = $part_bill_event->plandata ) =~ s/\n/<BR>/go;
% my $freq = $part_bill_event->freq || '1d';
+% my $reason = $part_bill_event->reasontext ;
%
% if ( $oldfreq ne $freq ) {
<TH CLASS="grid" BGCOLOR="#cccccc" COLSPAN=<% $cgi->param('showdisabled') ? 2 : 3 %>>Event</TH>
<TH CLASS="grid" BGCOLOR="#cccccc">After</TH>
<TH CLASS="grid" BGCOLOR="#cccccc">Action</TH>
+ <TH CLASS="grid" BGCOLOR="#cccccc">Reason</TH>
<TH CLASS="grid" BGCOLOR="#cccccc">Options</TH>
<TH CLASS="grid" BGCOLOR="#cccccc">Code</TH>
</TR>
<% $delay %></TD>
<TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
<% $part_bill_event->plan %></TD>
+ <TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
+ <% $reason %></TD>
<TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
<% $plandata %></TD>
<TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><FONT SIZE="-1">
% }
% }
+<% include('/elements/footer.html') %>
+
+<%init>
+
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+
+my %search;
+if ( $cgi->param('showdisabled') ) {
+%search = ();
+} else {
+%search = ( 'disabled' => '' );
+}
+
+my @part_bill_event = qsearch('part_bill_event', \%search );
+my $total = scalar(@part_bill_event);
-</BODY>
-</HTML>
+</%init>