From: Ivan Kohler Date: Mon, 13 Apr 2015 17:21:38 +0000 (-0700) Subject: fix payment amount search, RT#34471 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=3599ddd6c7990976c7c7a902255fa81a58d2bbe0 fix payment amount search, RT#34471 --- diff --git a/FS/FS/UI/Web.pm b/FS/FS/UI/Web.pm index 483bded28..df46e09e7 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';