summaryrefslogtreecommitdiff
path: root/FS/FS/svc_circuit.pm
diff options
context:
space:
mode:
authorJonathan Prykop <jonathan@freeside.biz>2015-10-31 01:26:07 -0500
committerJonathan Prykop <jonathan@freeside.biz>2015-11-10 23:36:50 -0600
commitafd8bcfd6fbbc40f7fa72df58166afc6e42ddf6d (patch)
tree2d22b66081b5ff66a673be1fcac377ab616ad4e6 /FS/FS/svc_circuit.pm
parent4d5a5d18c44bcd5b6b7d970434d6d271503e5442 (diff)
RT#38597: OQM - svc Circuit use and setup
Diffstat (limited to 'FS/FS/svc_circuit.pm')
-rw-r--r--FS/FS/svc_circuit.pm14
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