X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Felements%2Freport_cust_pay_or_refund.html;h=b69f82624ddc76a92c6c88a61a379a046a201281;hb=884bd92cd47b9602dab999502877545a5bc5be98;hp=25f7cdadd3c7ec20526ac9701d9ec1f91997ef4b;hpb=2a5d3c4f83803a2ef0059b7e03bb6286efcbe900;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 25f7cdadd..b69f82624 100644 --- a/httemplate/search/elements/report_cust_pay_or_refund.html +++ b/httemplate/search/elements/report_cust_pay_or_refund.html @@ -23,31 +23,27 @@ Examples: <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> + <& /elements/tr-select.html, + label => ucfirst(PL($name_singular)) . ' of type:', + field => 'payby', + options => [ keys %payby ], + labels => \%payby, + multiple => 1, + size => 18, + &> + +% if (substr($conf->config('card_masking_method'), -5) eq 'last4' || !$conf->config('card_masking_method')) { <TR> - <TD ALIGN="right"><% ucfirst(PL($name_singular)) %> of type: </TD> + <TD ALIGN="right"><% mt('Card Last 4 #:') |h %></TD> <TD> - <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> + <INPUT TYPE="text" ID="paymask" NAME="paymask"> </TD> </TR> - +% } <TR> <TD ALIGN="right"><% mt('Check #:') |h %> </TD> <TD> @@ -63,6 +59,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'), + &> +% } + <TR> <TD ALIGN="right" VALIGN="center"><% mt(ucfirst($name_singular). ' date') |h %></TD> <TD> @@ -127,8 +137,7 @@ Examples: 'label' => emt('Customer class'), 'field' => 'cust_classnum', 'multiple' => 1, - 'pre_options' => [ '' => emt('(none)') ], - 'all_selected' => 1, + 'pre_options' => [ 0 => emt('(none)') ], &> </TABLE> @@ -150,6 +159,12 @@ Examples: 'value' => 1, &> + <& /elements/tr-checkbox.html, + 'label' => emt('Include order number'), + 'field' => 'show_order_number', + 'value' => 1, + &> + </TABLE> % } @@ -179,4 +194,29 @@ 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)', + 'CARD-Discover' => 'credit card (Discover)', + 'CARD-Maestro' => 'credit card (Maestro/Switch/Solo)', + 'CARD-Tokenized' => 'credit card (Tokenized)', + + 'CHEK' => 'electronic check / ACH', + 'BILL' => 'check', + 'CASH' => 'cash', + 'PPAL' => 'Paypal', + 'APPL' => 'Apple Store', + 'ANRD' => 'Android Market', + + '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', +); + </%init>