[freeside-commits] freeside/FS/FS cust_main.pm,1.219,1.220
Ivan,,,
ivan at wavetail.420.am
Mon Jul 24 15:40:39 PDT 2006
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail:/tmp/cvs-serv12505
Modified Files:
cust_main.pm
Log Message:
fix up smart searching to make the quick payment entry behave better
Index: cust_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main.pm,v
retrieving revision 1.219
retrieving revision 1.220
diff -u -d -r1.219 -r1.220
--- cust_main.pm 23 Jul 2006 14:07:33 -0000 1.219
+++ cust_main.pm 24 Jul 2006 22:40:37 -0000 1.220
@@ -3866,6 +3866,11 @@
} elsif ( $search =~ /^\s*(\S.*\S)\s*$/ ) { #value search
my $value = lc($1);
+
+ # remove "(Last, First)" in "Company (Last, First"), otherwise the
+ # full strings the browser remembers won't work
+ $value =~ s/\([\w \,\.\-\']*\)$//; #false laziness w/Record::ut_name
+
my $q_value = dbh->quote($value);
#exact
@@ -3938,6 +3943,10 @@
}
+ #eliminate duplicates
+ my %saw = ();
+ @cust_main = grep { !$saw{$_->custnum}++ } @cust_main;
+
}
@cust_main;
More information about the freeside-commits
mailing list