X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fsvc_circuit.pm;h=520e881b4314345fbbcd15889ff37ed03e1197ee;hb=afd8bcfd6fbbc40f7fa72df58166afc6e42ddf6d;hp=06015bf756247c43828bd560b31af3796139e323;hpb=4d5a5d18c44bcd5b6b7d970434d6d271503e5442;p=freeside.git diff --git a/FS/FS/svc_circuit.pm b/FS/FS/svc_circuit.pm index 06015bf75..520e881b4 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