stray closing /TABLE in the no-ticket case
[freeside.git] / httemplate / search / report_cust_event.html
index 44cbadb..7aa4ff9 100644 (file)
@@ -5,53 +5,59 @@
 %>
 
     <FORM ACTION="cust_event.html" METHOD="GET">
-    <INPUT TYPE="hidden" NAME="failed" VALUE="<% $cgi->param('failed') %>">
-    <TABLE>
+    <TABLE BGCOLOR="#cccccc" CELLSPACING=0>
 
-      <% include( '/elements/tr-select-agent.html' ) %>
-
-      <!--<TR>
-        <TD ALIGN="right">Customer type</TD>
-        <TD><SELECT MULTIPLE NAME="perhaps_payby">
-          <OPTION SELECTED VALUE="CARD">Credit card (automatic)
-          <OPTION SELECTED VALUE="CHEK">E-check (automatic)
-          <OPTION SELECTED VALUE="LECB">Phone bill billing
-          <OPTION SELECTED VALUE="BILL">Billing
-          <OPTION SELECTED VALUE="DCRD">Credit card (on-demand)
-          <OPTION SELECTED VALUE="DCHK">E-check (on-demand)
-        </TD>
+      <TR>
+        <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1">Search options</FONT></TH>
       </TR>
-      -->
+
+      <% include( '/elements/tr-select-agent.html', 'disable_empty'=>0 ) %>
+
+      <% include( '/elements/tr-select-cust_main-status.html',
+                    'label' => 'Customer status',
+                    # this field is just called 'status'
+                )
+      %>
+
+      <% include( '/elements/tr-select-part_event.html',
+                    'label'        => 'Events',
+                    'multiple'     => 1,
+                    'all_selected' => 1,
+                )
+      %>
+
+%     if ( $cgi->param('failed') ) {
+      <& /elements/tr-fixed.html,
+        'label'         => 'Event status',
+        'field'         => 'event_status',
+        'curr_value'    => 'failed',
+        'formatted_value' => 'Failed',
+      &>
+%     } else {
+
+% # 'initial' is not on here, since nobody needs to see it. also,
+% # 'done_Y' = "done, and no_action is null, and statustext is null"
+% # 'done_S' = "done, and no_action is null, and statustext is not null"
+% # 'done_N' = "done, and no_action = 'Y'".
+      <& /elements/tr-select.html,
+        'label'         => 'Event status',
+        'field'         => 'event_status',
+        'multiple'      => 1,
+        'all_selected'  => 1,
+        'size'          => 5,
+        'options'       => [ qw( done_Y done_S done_N failed new locked ) ],
+        'option_labels' => { done_Y => 'Completed normally',
+                             done_S => 'Completed, with an error',
+                             done_N => 'Completed, no action taken',
+                             failed => 'Failed',
+                             new    => 'Not yet processed',
+                             locked => 'Running',
+                           },
+      &>
+%     }
+
       <% include( '/elements/tr-input-beginning_ending.html' ) %>
-      <!--
-      <TR>
-        <TD ALIGN="right">Events: </TD>
-        <TD>
-          <SELECT NAME="eventpart">
-            <OPTION SELECTED VALUE=""><% $cgi->param('failed') ? '(all failed events)' : '(all events)' %>
-% #foreach my $part_bill_event ( qsearch( 'part_bill_event', {} ) ) { 
-% #} 
 
-          </SELECT>
-        </TD>
-      </TR>
-      -->
-<!--      <TR>
-        <TD ALIGN="right">Events for payment type: </TD>
-        <TD>
-          <SELECT NAME="part_bill_event.payby">
-            <OPTION SELECTED VALUE="">(all)
-            <OPTION VALUE="CARD">Credit card (automatic)
-            <OPTION VALUE="BILL">Billing
-            <OPTION VALUE="CHEK">Electronic check (automatic)
-            <OPTION VALUE="DCRD">Credit card (on-demand)
-            <OPTION VALUE="DCHK">Electronic check (on-demand)
-            <OPTION VALUE="LECB">Phone bill billing
-            <OPTION VALUE="COMP">Complimentary
-          </SELECT>
-        </TD>
-      </TR>
--->
     </TABLE>
     <BR><INPUT TYPE="submit" VALUE="Get Report">
     </FORM>