X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fsvc_acct.pm;h=3e264e6a30e782015282c18a897c78047fc5b569;hb=2b311f86e0560428f34d798fe95161dab52e321e;hp=19f292157dc364aab1ab06fd50e8678f3c72c5fc;hpb=63a268637b2d51a8766412617724b9436439deb6;p=freeside.git diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm index 19f292157..3e264e6a3 100644 --- a/FS/FS/svc_acct.pm +++ b/FS/FS/svc_acct.pm @@ -436,13 +436,7 @@ sub search_sql { $class->search_sql_field('username', $string ). ' ) '; } else { - ' ( '. - $class->search_sql_field('username', $string). - ( $string =~ /^\d+$/ - ? 'OR '. $class->search_sql_field('svcnum', $string) - : '' - ). - ' ) '; + $class->search_sql_field('username', $string); } } @@ -2122,8 +2116,8 @@ sub set_usage { #$self->snapshot; #not necessary, we retain the old values #create an object with the updated usage values my $new = qsearchs('svc_acct', { 'svcnum' => $self->svcnum }); - #call exports - my $error = $new->replace($self); + local($FS::Record::nowarn_identical) = 1; + my $error = $new->replace($self); #call exports if ( $error ) { $dbh->rollback if $oldAutoCommit; return "Error replacing: $error";