X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fsvc_circuit.pm;h=408bd79e422dcdb069aa5ab17bd125bf33577699;hp=f705c68f431d2cc70c3f795226ea850e132b88c7;hb=212dee7b6078fc6a9dff3469b07274da5b1e905e;hpb=b8fc5d2178e7358661e37ef97b7619f7a9080f3a

diff --git a/FS/FS/svc_circuit.pm b/FS/FS/svc_circuit.pm
index f705c68f4..408bd79e4 100644
--- a/FS/FS/svc_circuit.pm
+++ b/FS/FS/svc_circuit.pm
@@ -218,6 +218,20 @@ sub label {
   $self->get('circuit_id');
 }
 
+sub search_sql {
+  my ($class, $string) = @_;
+  my @where = ();
+  push @where, 'LOWER(svc_circuit.circuit_id) = \''.lc($string).'\'';
+  push @where, 'LOWER(circuit_provider.provider) = \''.lc($string).'\'';
+  push @where, 'LOWER(circuit_type.typename) = \''.lc($string).'\'';
+  '(' . join(' OR ', @where) . ')';
+}
+
+sub search_sql_addl_from {
+  'LEFT JOIN circuit_provider USING ( providernum ) '.
+  'LEFT JOIN circuit_type USING ( typenum )';
+}
+
 =back
 
 =head1 SEE ALSO