<TR>
<TH CLASS="background" COLSPAN=2 ALIGN="left">
- <FONT SIZE="+1"><% mt('Search options') |h %></FONT>
+ <FONT SIZE="+1"><% mt('Payment search options') |h %></FONT>
</TH>
</TR>
<TR>
<TD ALIGN="right"><% ucfirst(PL($name_singular)) %> of type: </TD>
<TD>
- <SELECT NAME="payby" onChange="payby_changed(this)">
- <OPTION VALUE=""><% mt('all') |h %></OPTION>
- <OPTION VALUE="CARD"><% mt('credit card (all)') |h %></OPTION>
- <OPTION VALUE="CARD-VisaMC"><% mt('credit card (Visa/MasterCard)') |h %></OPTION>
- <OPTION VALUE="CARD-Amex"><% mt('credit card (American Express)') |h %></OPTION>
- <OPTION VALUE="CARD-Discover"><% mt('credit card (Discover)') |h %></OPTION>
- <OPTION VALUE="CARD-Maestro"><% mt('credit card (Maestro/Switch/Solo)') |h %></OPTION>
- <OPTION VALUE="CHEK"><% mt('electronic check / ACH') |h %></OPTION>
- <OPTION VALUE="BILL"><% mt('check') |h %></OPTION>
- <OPTION VALUE="PREP"><% mt('prepaid card') |h %></OPTION>
- <OPTION VALUE="CASH"><% mt('cash') |h %></OPTION>
- <OPTION VALUE="WEST"><% mt('Western Union') |h %></OPTION>
- <OPTION VALUE="MCRD"><% mt('manual credit card') |h %></OPTION>
+ <SELECT NAME="payby" SIZE=10 MULTIPLE>
+%# <OPTION VALUE=""><% mt('all') |h %></OPTION>
+%# <OPTION VALUE="CARD"><% mt('credit card (all)') |h %></OPTION>
+ <OPTION VALUE="CARD-VisaMC" SELECTED><% mt('credit card (Visa/MasterCard)') |h %></OPTION>
+ <OPTION VALUE="CARD-Amex" SELECTED><% mt('credit card (American Express)') |h %></OPTION>
+ <OPTION VALUE="CARD-Discover" SELECTED><% mt('credit card (Discover)') |h %></OPTION>
+ <OPTION VALUE="CARD-Maestro" SELECTED><% mt('credit card (Maestro/Switch/Solo)') |h %></OPTION>
+ <OPTION VALUE="CARD-Tokenized" SELECTED><% mt('credit card (Tokenized)') |h %></OPTION>
+ <OPTION VALUE="CHEK" SELECTED><% mt('electronic check / ACH') |h %></OPTION>
+ <OPTION VALUE="BILL" SELECTED><% mt('check') |h %></OPTION>
+ <OPTION VALUE="PREP" SELECTED><% mt('prepaid card') |h %></OPTION>
+ <OPTION VALUE="CASH" SELECTED><% mt('cash') |h %></OPTION>
+ <OPTION VALUE="WEST" SELECTED><% mt('Western Union') |h %></OPTION>
+ <OPTION VALUE="MCRD" SELECTED><% mt('manual credit card') |h %></OPTION>
</SELECT>
</TD>
</TR>
- <SCRIPT TYPE="text/javascript">
-
- function payby_changed(what) {
- if ( what.value == 'BILL' ) {
- show('payinfo');
- hide('ccpay');
- } else if ( what.value.match(/^CARD|CHEK/) ) {
- hide('payinfo');
- show('ccpay');
- } else {
- hide('payinfo');
- hide('ccpay');
- }
- }
-
- function show(what) {
- document.getElementById(what+'_caption').style.color = '#000000';
- document.getElementById(what).disabled = false;
- document.getElementById(what).style.backgroundColor = '#ffffff';
- }
-
- function hide(what) {
- document.getElementById(what+'_caption').style.color = '#bbbbbb';
- document.getElementById(what).disabled = true;
- document.getElementById(what).style.backgroundColor = '#dddddd';
- }
-
-
-
- </SCRIPT>
-
<TR>
- <TD ALIGN="right"><FONT ID="payinfo_caption" COLOR="#bbbbbb"><% mt('Check #:') |h %> </FONT></TD>
+ <TD ALIGN="right"><% mt('Check #:') |h %> </TD>
<TD>
- <INPUT TYPE="text" ID="payinfo" NAME="payinfo" DISABLED STYLE="background-color: #dddddd">
+ <INPUT TYPE="text" ID="payinfo" NAME="payinfo">
</TD>
</TR>
<TR>
- <TD ALIGN="right">
- <FONT ID="ccpay_caption" COLOR="#bbbbbb">
- <% mt('Transaction #') |h %>
- </FONT>
- </TD>
+ <TD ALIGN="right"><% mt('Transaction #:') |h %> </TD>
<TD>
- <INPUT TYPE="text" ID="ccpay" NAME="ccpay" DISABLED STYLE="background-color: #dddddd">
+ <INPUT TYPE="text" ID="ccpay" NAME="ccpay">
</TD>
</TR>
- <& /elements/tr-select-agent.html,
- 'curr_value' => scalar($cgi->param('agentnum')),
- 'label' => emt('for agent: '),
- 'disable_empty' => 0,
- &>
-
<& /elements/tr-select-user.html &>
<TR>
- <TD ALIGN="right" VALIGN="center"><% mt('Payment') |h %></TD>
+ <TD ALIGN="right" VALIGN="center"><% mt(ucfirst($name_singular). ' date') |h %></TD>
<TD>
<TABLE>
<& /elements/tr-input-beginning_ending.html,
- layout => 'horiz',
+ layout => 'horiz',
+ input_time => $conf->exists('report-cust_pay-select_time'),
&>
</TABLE>
</TD>
</TR>
% }
+% if ( $table eq 'cust_pay' ) {
+
+% # payment batch
+% # <& /elements/tr-select-batchnum.html &>
+
+% #payment "entry" batch (should probably just all become the same thing)
+ <& /elements/tr-select-paybatch.html &>
+
+% }
+
<& /elements/tr-input-lessthan_greaterthan.html,
'label' => emt('Amount'),
'field' => 'paid',
&>
+
+</TABLE>
+<BR>
+
+
+<TABLE BGCOLOR="#cccccc" CELLSPACING=0>
+
+ <TR>
+ <TH CLASS="background" COLSPAN=2 ALIGN="left">
+ <FONT SIZE="+1"><% mt('Customer search options') |h %></FONT>
+ </TH>
+ </TR>
+
+ <& /elements/tr-select-agent.html,
+ 'curr_value' => scalar($cgi->param('agentnum')),
+ 'label' => emt('Agent'),
+ 'disable_empty' => 0,
+ &>
+
+ <& /elements/tr-select-cust_class.html,
+ 'label' => emt('Customer class'),
+ 'field' => 'cust_classnum',
+ 'multiple' => 1,
+ 'pre_options' => [ '' => emt('(none)') ],
+ 'all_selected' => 1,
+ &>
+
+</TABLE>
+
% if ( $table eq 'cust_pay' ) {
+
+ <BR>
+ <TABLE BGCOLOR="#cccccc" CELLSPACING=0>
+
+ <TR>
+ <TH CLASS="background" COLSPAN=2 ALIGN="left">
+ <FONT SIZE="+1"><% mt('Display options') |h %></FONT>
+ </TH>
+ </TR>
+
<& /elements/tr-checkbox.html,
'label' => emt('Include tax names'),
'field' => 'tax_names',
'value' => 1,
&>
-% }
</TABLE>
+% }
+
<BR>
<INPUT TYPE="submit" VALUE="<% mt('Get Report') |h %>">
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Financial reports');
+my $conf = new FS::Conf;
+
my $void = $cgi->param('void') ? 1 : 0;
my $unapplied = $cgi->param('unapplied') ? 1 : 0;