[freeside-commits] branch master updated. b9480e431289b01d37c8206df4285d311cf2c0e8

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


The branch, master has been updated
       via  b9480e431289b01d37c8206df4285d311cf2c0e8 (commit)
      from  6a89c38f9f9894e2f963b2dc08d587b83fd3350f (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 b9480e431289b01d37c8206df4285d311cf2c0e8
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Mon Apr 13 10:21:35 2015 -0700

    fix payment amount search, RT#34471

diff --git a/FS/FS/UI/Web.pm b/FS/FS/UI/Web.pm
index e138692..4461d99 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