[freeside-commits] branch FREESIDE_3_BRANCH updated. 3599ddd6c7990976c7c7a902255fa81a58d2bbe0

Ivan ivan at 420.am
Mon Apr 13 10:21:40 PDT 2015


The branch, FREESIDE_3_BRANCH has been updated
       via  3599ddd6c7990976c7c7a902255fa81a58d2bbe0 (commit)
      from  9e138f11de764031d4b67ec2c87a5ccda2dd7fbc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3599ddd6c7990976c7c7a902255fa81a58d2bbe0
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Mon Apr 13 10:21:38 2015 -0700

    fix payment amount search, RT#34471

diff --git a/FS/FS/UI/Web.pm b/FS/FS/UI/Web.pm
index 483bded..df46e09 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 699266d..0e3fce3 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';
 

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/UI/Web.pm                                    |    5 +++--
 httemplate/search/elements/cust_pay_or_refund.html |    2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)




More information about the freeside-commits mailing list