X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fsearch%2Felements%2Freport_cust_pay_or_refund.html;h=1cc77f728df54dcb598686d6f6f54757f21c3b61;hp=b39c7c0886b16d3248c95eb7ef54239ab30d6f48;hb=41fc6d0a8aa5921638ac2767265a7528855a5251;hpb=22f8f47d6b14d421b9ce8fd5d901df28c220281a diff --git a/httemplate/search/elements/report_cust_pay_or_refund.html b/httemplate/search/elements/report_cust_pay_or_refund.html index b39c7c088..1cc77f728 100644 --- a/httemplate/search/elements/report_cust_pay_or_refund.html +++ b/httemplate/search/elements/report_cust_pay_or_refund.html @@ -23,30 +23,18 @@ Examples: - <% mt('Payment search options') |h %> + <% mt('[_1] search options', ucfirst($name_singular)) |h %> - - <% ucfirst(PL($name_singular)) %> of type: - - - - + <& /elements/tr-select.html, + label => ucfirst(PL($name_singular)) . ' of type:', + field => 'payby', + options => [ keys %payby ], + labels => \%payby, + multiple => 1, + size => 18, + &> <% mt('Check #:') |h %> @@ -63,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 %> @@ -89,6 +91,16 @@ Examples: % } +% 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', @@ -117,8 +129,7 @@ Examples: 'label' => emt('Customer class'), 'field' => 'cust_classnum', 'multiple' => 1, - 'pre_options' => [ '' => emt('(none)') ], - 'all_selected' => 1, + 'pre_options' => [ 0 => emt('(none)') ], &> @@ -140,6 +151,12 @@ Examples: 'value' => 1, &> + <& /elements/tr-checkbox.html, + 'label' => emt('Include order number'), + 'field' => 'show_order_number', + 'value' => 1, + &> + % } @@ -169,4 +186,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', +); +