diff options
author | Ivan Kohler <ivan@freeside.biz> | 2015-04-13 10:21:35 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2015-04-13 10:21:35 -0700 |
commit | b9480e431289b01d37c8206df4285d311cf2c0e8 (patch) | |
tree | 7b913121f2ff1c9c525802a58d0acf78e6031afb | |
parent | 6a89c38f9f9894e2f963b2dc08d587b83fd3350f (diff) |
fix payment amount search, RT#34471
-rw-r--r-- | FS/FS/UI/Web.pm | 5 | ||||
-rwxr-xr-x | httemplate/search/elements/cust_pay_or_refund.html | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/FS/FS/UI/Web.pm b/FS/FS/UI/Web.pm index e13869265..4461d992a 100644 --- a/FS/FS/UI/Web.pm +++ b/FS/FS/UI/Web.pm @@ -170,7 +170,8 @@ sub svc_export_links { } sub parse_lt_gt { - my($cgi, $field) = @_; + my($cgi, $field) = (shift, shift); + my $table = ( @_ && length($_[0]) ) ? shift.'.' : ''; my @search = (); @@ -188,7 +189,7 @@ sub parse_lt_gt { my $num = $1; $num =~ s/[\,\s]+//g; - my $search = "$field $op{$op} $num"; + my $search = "$table$field $op{$op} $num"; push @search, $search; warn "found ${field}_$op field; adding search element $search\n" diff --git a/httemplate/search/elements/cust_pay_or_refund.html b/httemplate/search/elements/cust_pay_or_refund.html index 699266d0f..0e3fce303 100755 --- a/httemplate/search/elements/cust_pay_or_refund.html +++ b/httemplate/search/elements/cust_pay_or_refund.html @@ -437,7 +437,7 @@ if ( $cgi->param('magic') ) { "$table.void_date <= $v_ending"; } - push @search, FS::UI::Web::parse_lt_gt($cgi, "$table.$amount_field" ); + push @search, FS::UI::Web::parse_lt_gt($cgi, $amount_field, $table); $orderby = '_date'; |