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">
20 <INPUT TYPE="hidden" NAME="unapplied" VALUE="<% $unapplied %>">
22 <TABLE BGCOLOR="#cccccc" CELLSPACING=0>
25 <TH CLASS="background" COLSPAN=2 ALIGN="left">
26 <FONT SIZE="+1">Search options</FONT>
31 <TD ALIGN="right"><% ucfirst(PL($name_singular)) %> of type: </TD>
33 <SELECT NAME="payby" onChange="payby_changed(this)">
34 <OPTION VALUE="">all</OPTION>
35 <OPTION VALUE="CARD">credit card (all)</OPTION>
36 <OPTION VALUE="CARD-VisaMC">credit card (Visa/MasterCard)</OPTION>
37 <OPTION VALUE="CARD-Amex">credit card (American Express)</OPTION>
38 <OPTION VALUE="CARD-Discover">credit card (Discover)</OPTION>
39 <OPTION VALUE="CARD-Maestro">credit card (Maestro/Switch/Solo)</OPTION>
40 <OPTION VALUE="CHEK">electronic check / ACH</OPTION>
41 <OPTION VALUE="BILL">check</OPTION>
42 <OPTION VALUE="PREP">prepaid card</OPTION>
43 <OPTION VALUE="CASH">cash</OPTION>
44 <OPTION VALUE="WEST">Western Union</OPTION>
45 <OPTION VALUE="MCRD">manual credit card</OPTION>
50 <SCRIPT TYPE="text/javascript">
52 function payby_changed(what) {
53 if ( what.options[what.selectedIndex].value == 'BILL' ) {
54 document.getElementById('checkno_caption').style.color = '#000000';
55 what.form.payinfo.disabled = false;
56 what.form.payinfo.style.backgroundColor = '#ffffff';
58 document.getElementById('checkno_caption').style.color = '#bbbbbb';
59 what.form.payinfo.disabled = true;
60 what.form.payinfo.style.backgroundColor = '#dddddd';
67 <TD ALIGN="right"><FONT ID="checkno_caption" COLOR="#bbbbbb">Check #: </FONT></TD>
69 <INPUT TYPE="text" NAME="payinfo" DISABLED STYLE="background-color: #dddddd">
73 <% include( '/elements/tr-select-agent.html',
74 'curr_value' => scalar($cgi->param('agentnum')),
75 'label' => 'for agent: ',
80 <% include( '/elements/tr-select-user.html' ) %>
83 <TD ALIGN="right" VALIGN="center">Payment</TD>
86 <% include( '/elements/tr-input-beginning_ending.html',
96 <TD ALIGN="right" VALIGN="center">Voided</TD>
99 <% include( '/elements/tr-input-beginning_ending.html',
109 <% include( '/elements/tr-input-lessthan_greaterthan.html',
115 % if ( $table eq 'cust_pay' ) {
116 <% include( '/elements/tr-checkbox.html',
117 'label' => 'Include tax names',
118 'field' => 'tax_names',
127 <INPUT TYPE="submit" VALUE="Get Report">
131 <% include('/elements/footer.html') %>
135 my $table = 'cust_'.$opt{'thing'};
136 my $name_singular = $opt{'name_singular'};
139 unless $FS::CurrentUser::CurrentUser->access_right('Financial reports');
141 my $void = $cgi->param('void') ? 1 : 0;
142 my $unapplied = $cgi->param('unapplied') ? 1 : 0;
144 my $title = $void ? "Voided $name_singular report" :
145 $unapplied ? "Unapplied $name_singular report" :
146 "\u$name_singular report" ;
147 $table .= '_void' if $void;