From: ivan Date: Mon, 27 Jul 2009 09:59:06 +0000 (+0000) Subject: searching for voided payments by void date as well, RT#5786 X-Git-Tag: freeside_1_9_1^2~195 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=342de0c0922c4fac8d6ace5a38670ace35366571;p=freeside.git searching for voided payments by void date as well, RT#5786 --- diff --git a/httemplate/search/elements/cust_pay_or_refund.html b/httemplate/search/elements/cust_pay_or_refund.html index acd57912f..874bd8aa3 100755 --- a/httemplate/search/elements/cust_pay_or_refund.html +++ b/httemplate/search/elements/cust_pay_or_refund.html @@ -117,7 +117,6 @@ if ( $cgi->param('magic') ) { my $orderby; if ( $cgi->param('magic') eq '_date' ) { - if ( $cgi->param('agentnum') && $cgi->param('agentnum') =~ /^(\d+)$/ ) { push @search, "agentnum = $1"; # $search{'agentnum'} = $1; my $agent = qsearchs('agent', { 'agentnum' => $1 } ); @@ -219,6 +218,13 @@ if ( $cgi->param('magic') ) { push @search, "_date >= $beginning ", "_date <= $ending"; + if ( $thing eq 'pay_void' ) { + my($v_beginning, $v_ending) = + FS::UI::Web::parse_beginning_ending($cgi, 'void'); + push @search, "void_date >= $v_beginning ", + "void_date <= $v_ending"; + } + push @search, FS::UI::Web::parse_lt_gt($cgi, $amount_field ); $orderby = '_date'; diff --git a/httemplate/search/report_cust_pay.html b/httemplate/search/report_cust_pay.html index a9695acb7..dd2358ad1 100644 --- a/httemplate/search/report_cust_pay.html +++ b/httemplate/search/report_cust_pay.html @@ -3,7 +3,13 @@
- +
+ + + + @@ -55,7 +61,32 @@ ) %> - <% include( '/elements/tr-input-beginning_ending.html' ) %> + + + + + +% if ( $void ) { + + + + +% } <% include( '/elements/tr-input-lessthan_greaterthan.html', 'label' => 'Amount',
+ Search options +
Payments of type:
Payment + + <% include( '/elements/tr-input-beginning_ending.html', + layout => 'horiz', + ) + %> +
+
Voided + + <% include( '/elements/tr-input-beginning_ending.html', + prefix => 'void', + layout => 'horiz', + ) + %> +
+