[freeside-commits] branch FREESIDE_3_BRANCH updated. 83be664e22c7b4e9b974c04884145c028ef42d17

Ivan ivan at 420.am
Tue Apr 7 11:17:19 PDT 2015


The branch, FREESIDE_3_BRANCH has been updated
       via  83be664e22c7b4e9b974c04884145c028ef42d17 (commit)
      from  27f89917927f34366c45318c11c7c90fa2543d5b (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 83be664e22c7b4e9b974c04884145c028ef42d17
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Tue Apr 7 11:17:17 2015 -0700

    check number searches ignore leading 0s

diff --git a/FS/FS/Mason.pm b/FS/FS/Mason.pm
index 4cf0798..d0a530e 100644
--- a/FS/FS/Mason.pm
+++ b/FS/FS/Mason.pm
@@ -131,7 +131,7 @@ if ( -e $addl_handler_use_file ) {
   use FS::UID qw( getotaker dbh datasrc driver_name );
   use FS::Record qw( qsearch qsearchs fields dbdef
                     str2time_sql str2time_sql_closing
-                    midnight_sql
+                    midnight_sql regexp_sql
                    );
   use FS::Conf;
   use FS::CGI qw(header menubar table itable ntable idiot
diff --git a/httemplate/search/elements/cust_pay_or_refund.html b/httemplate/search/elements/cust_pay_or_refund.html
index 7bebe7f..699266d 100755
--- a/httemplate/search/elements/cust_pay_or_refund.html
+++ b/httemplate/search/elements/cust_pay_or_refund.html
@@ -402,7 +402,8 @@ if ( $cgi->param('magic') ) {
     if ( $cgi->param('payinfo') ) {
       $cgi->param('payinfo') =~ /^\s*(\d+)\s*$/
         or die "illegal payinfo ". $cgi->param('payinfo');
-      push @search, "$table.payinfo = '$1'";
+      my $regexp = regexp_sql();
+      push @search, "$table.payinfo $regexp '^0*$1\$'";
     }
 
     if ( $cgi->param('ccpay') =~ /^([\w-:]+)$/ ) {
@@ -538,6 +539,7 @@ if ( $cgi->param('magic') ) {
 } else {
 
   #hmm... is this still used?
+  warn "undefined search magic";
 
   $cgi->param('payinfo') =~ /^\s*(\d+)\s*$/ or die "illegal payinfo";
   my $payinfo = $1;

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

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




More information about the freeside-commits mailing list