diff options
author | Jonathan Prykop <jonathan@freeside.biz> | 2015-10-31 01:26:07 -0500 |
---|---|---|
committer | Jonathan Prykop <jonathan@freeside.biz> | 2015-11-10 23:36:50 -0600 |
commit | afd8bcfd6fbbc40f7fa72df58166afc6e42ddf6d (patch) | |
tree | 2d22b66081b5ff66a673be1fcac377ab616ad4e6 /FS/FS/svc_circuit.pm | |
parent | 4d5a5d18c44bcd5b6b7d970434d6d271503e5442 (diff) |
RT#38597: OQM - svc Circuit use and setup
Diffstat (limited to 'FS/FS/svc_circuit.pm')
-rw-r--r-- | FS/FS/svc_circuit.pm | 14 |
1 files changed, 14 insertions, 0 deletions
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 |