tax names on payment search report #9760
[freeside.git] / httemplate / search / report_cust_pay.html
index 0327e04..8d41c80 100644 (file)
@@ -1,9 +1,15 @@
-<% include('/elements/header.html', 'Payment report' ) %>
+<% include('/elements/header.html', $title ) %>
 
-<FORM ACTION="cust_pay.cgi" METHOD="GET">
+<FORM ACTION="<% $void ? 'cust_pay_void.html' : 'cust_pay.cgi' %>" METHOD="GET">
 <INPUT TYPE="hidden" NAME="magic" VALUE="_date">
 
-<TABLE>
+<TABLE BGCOLOR="#cccccc" CELLSPACING=0>
+
+  <TR>
+    <TH BGCOLOR="#e8e8e8" COLSPAN=2 ALIGN="left">
+      <FONT SIZE="+1">Search options</FONT>
+    </TH>
+  </TR>
 
   <TR>
     <TD ALIGN="right">Payments of type: </TD>
   </TR>
 
   <% include( '/elements/tr-select-agent.html',
-                 $cgi->param('agentnum'),
-                 'label' => 'for agent: ',
+                 'curr_value'    => scalar($cgi->param('agentnum')),
+                 'label'         => 'for agent: ',
+                 'disable_empty' => 0,
              )
   %>
 
-  <% include( '/elements/tr-input-beginning_ending.html' ) %>
+  <% include( '/elements/tr-select-otaker.html' ) %>
+
+  <TR>
+    <TD ALIGN="right" VALIGN="center">Payment</TD>
+    <TD>
+      <TABLE>
+        <% include( '/elements/tr-input-beginning_ending.html',
+                      layout   => 'horiz',
+                  )
+        %>
+      </TABLE>
+    </TD>
+  </TR>
+
+% if ( $void ) {
+    <TR>
+      <TD ALIGN="right" VALIGN="center">Voided</TD>
+      <TD>
+        <TABLE>
+          <% include( '/elements/tr-input-beginning_ending.html',
+                        prefix => 'void',
+                        layout => 'horiz',
+                    )
+          %>
+        </TABLE>
+      </TD>
+    </TR>
+% }
 
   <% include( '/elements/tr-input-lessthan_greaterthan.html',
                 'label' => 'Amount',
             )
   %>
 
+  <% include( '/elements/tr-checkbox.html',
+                'label' => 'Include tax names',
+               'field' => 'tax_names',
+                'value' => 1,
+            )
+  %>
+
+
 </TABLE>
 
 <BR>
 die "access denied"
   unless $FS::CurrentUser::CurrentUser->access_right('Financial reports');
 
+my $void = $cgi->param('void') ? 1 : 0;
+
+my $title = $void ? 'Voided payment report' : 'Payment report';
+
 </%init>