X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Felements%2Freport_cust_pay_or_refund.html;h=730db68e8b031361b74ac298b78d3d7f29435df9;hb=816f74ae7cec86971d6fd2abfd45a166532f720c;hp=70727c00774a81c7e2c21c44bbe5a81df3cc05b0;hpb=9aee669886202be7035e6c6049fc71bc99dd3013;p=freeside.git diff --git a/httemplate/search/elements/report_cust_pay_or_refund.html b/httemplate/search/elements/report_cust_pay_or_refund.html index 70727c007..730db68e8 100644 --- a/httemplate/search/elements/report_cust_pay_or_refund.html +++ b/httemplate/search/elements/report_cust_pay_or_refund.html @@ -23,7 +23,7 @@ Examples: - <% mt('Payment search options') |h %> + <% mt('[_1] search options', ucfirst($name_singular)) |h %> @@ -33,7 +33,7 @@ Examples: options => [ keys(\%payby) ], labels => \%payby, multiple => 1, - size => 16 + size => 18, &> @@ -51,6 +51,20 @@ Examples: <& /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'), + &> +% } + <% mt(ucfirst($name_singular). ' date') |h %> @@ -166,6 +180,8 @@ my $title = $void ? "Voided $name_singular report" : "\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)', @@ -183,6 +199,7 @@ tie (my %payby, 'Tie::IxHash', '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',