5 include( 'elements/report_cust_pay_or_refund.html',
7 'name_singular' => 'payment',
10 include( 'elements/report_cust_pay_or_refund.html',
12 'name_singular' => 'refund',
16 <% include('/elements/header.html', $title ) %>
18 <FORM ACTION="<% $table %>.html" METHOD="GET">
19 <INPUT TYPE="hidden" NAME="magic" VALUE="_date">
21 <TABLE BGCOLOR="#cccccc" CELLSPACING=0>
24 <TH CLASS="background" COLSPAN=2 ALIGN="left">
25 <FONT SIZE="+1">Search options</FONT>
30 <TD ALIGN="right"><% ucfirst(PL($name_singular)) %> of type: </TD>
32 <SELECT NAME="payby" onChange="payby_changed(this)">
33 <OPTION VALUE="">all</OPTION>
34 <OPTION VALUE="CARD">credit card (all)</OPTION>
35 <OPTION VALUE="CARD-VisaMC">credit card (Visa/MasterCard)</OPTION>
36 <OPTION VALUE="CARD-Amex">credit card (American Express)</OPTION>
37 <OPTION VALUE="CARD-Discover">credit card (Discover)</OPTION>
38 <OPTION VALUE="CARD-Maestro">credit card (Maestro/Switch/Solo)</OPTION>
39 <OPTION VALUE="CHEK">electronic check / ACH</OPTION>
40 <OPTION VALUE="BILL">check</OPTION>
41 <OPTION VALUE="PREP">prepaid card</OPTION>
42 <OPTION VALUE="CASH">cash</OPTION>
43 <OPTION VALUE="WEST">Western Union</OPTION>
44 <OPTION VALUE="MCRD">manual credit card</OPTION>
49 <SCRIPT TYPE="text/javascript">
51 function payby_changed(what) {
52 if ( what.options[what.selectedIndex].value == 'BILL' ) {
53 document.getElementById('checkno_caption').style.color = '#000000';
54 what.form.payinfo.disabled = false;
55 what.form.payinfo.style.backgroundColor = '#ffffff';
57 document.getElementById('checkno_caption').style.color = '#bbbbbb';
58 what.form.payinfo.disabled = true;
59 what.form.payinfo.style.backgroundColor = '#dddddd';
66 <TD ALIGN="right"><FONT ID="checkno_caption" COLOR="#bbbbbb">Check #: </FONT></TD>
68 <INPUT TYPE="text" NAME="payinfo" DISABLED STYLE="background-color: #dddddd">
72 <% include( '/elements/tr-select-agent.html',
73 'curr_value' => scalar($cgi->param('agentnum')),
74 'label' => 'for agent: ',
79 <% include( '/elements/tr-select-user.html' ) %>
82 <TD ALIGN="right" VALIGN="center">Payment</TD>
85 <% include( '/elements/tr-input-beginning_ending.html',
95 <TD ALIGN="right" VALIGN="center">Voided</TD>
98 <% include( '/elements/tr-input-beginning_ending.html',
108 <% include( '/elements/tr-input-lessthan_greaterthan.html',
114 % if ( $table eq 'cust_pay' ) {
115 <% include( '/elements/tr-checkbox.html',
116 'label' => 'Include tax names',
117 'field' => 'tax_names',
126 <INPUT TYPE="submit" VALUE="Get Report">
130 <% include('/elements/footer.html') %>
134 my $table = 'cust_'.$opt{'thing'};
135 my $name_singular = $opt{'name_singular'};
138 unless $FS::CurrentUser::CurrentUser->access_right('Financial reports');
140 my $void = $cgi->param('void') ? 1 : 0;
142 my $title = $void ? "Voided $name_singular report" : "\u$name_singular report";
143 $table .= '_void' if $void;