<TR>
<TH CLASS="background" COLSPAN=2 ALIGN="left">
- <FONT SIZE="+1"><% mt('Payment search options') |h %></FONT>
+ <FONT SIZE="+1"><% mt('[_1] search options', ucfirst($name_singular)) |h %></FONT>
</TH>
</TR>
options => [ keys(\%payby) ],
labels => \%payby,
multiple => 1,
- size => 16
+ size => 18,
&>
<TR>
<& /elements/tr-select-user.html &>
+% if ( $has_reason ) {
+% # limit to reasons that are in use for the table being reported on
+% # (maybe order by count(*) desc?)
+ <& /elements/tr-select-table.html,
+ label => emt('Reason'),
+ field => 'reasonnum',
+ id => 'reasonnum',
+ table => 'reason',
+ name_col => 'reason',
+ extra_sql => " WHERE EXISTS(SELECT 1 FROM $table WHERE $table.reasonnum = reason.reasonnum) ",
+ empty_label => emt('any'),
+ &>
+% }
+
<TR>
<TD ALIGN="right" VALIGN="center"><% mt(ucfirst($name_singular). ' date') |h %></TD>
<TD>
'value' => 1,
&>
+ <& /elements/tr-checkbox.html,
+ 'label' => emt('Include order number'),
+ 'field' => 'show_order_number',
+ 'value' => 1,
+ &>
+
</TABLE>
% }
"\u$name_singular report" ;
$table .= '_void' if $void;
+my $has_reason = dbdef->table($table)->column('reasonnum');
+
tie (my %payby, 'Tie::IxHash',
'CARD-VisaMC' => 'credit card (Visa/MasterCard)',
'CARD-Amex' => 'credit card (American Express)',
'PREP' => 'prepaid card',
'WIRE' => 'wire transfer',
'WEST' => 'Western Union',
+ 'IDTP' => 'IDT Payment Services',
'EDI' => 'Electronic Debit (EDI)',
'MCRD' => 'manual credit card',
'MCHK' => 'manual electronic check',