X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fphone_type.pm;h=3d9dced6f8e9c013fac4d26ce2a8446e2c7fc2c9;hb=562a3c85e49cd3ea8fb80e5c2fd7f4c5f60333e9;hp=d2ef465bdf3789f4026c3028daa24f94ed6ef992;hpb=624b2d44625f69d71175c3348cae635d580c890b;p=freeside.git diff --git a/FS/FS/phone_type.pm b/FS/FS/phone_type.pm index d2ef465bd..3d9dced6f 100644 --- a/FS/FS/phone_type.pm +++ b/FS/FS/phone_type.pm @@ -1,7 +1,7 @@ package FS::phone_type; +use base qw( FS::Record ); use strict; -use base qw( FS::Record ); use FS::Record qw( qsearch ); # qsearchs ); =head1 NAME @@ -91,6 +91,18 @@ sub check { $self->SUPER::check; } +=item get_phone_types + +returns a list of phone_types. + +=cut + +sub get_phone_types { + ## only using mobile(3) and work(1) right now. + my @phone_types = qsearch({table=>'phone_type', order_by=>'ORDER BY weight DESC', extra_sql => " WHERE phonetypenum IN ('1','3')"}); + return @phone_types; +} + # Used by FS::Setup to initialize a new database. sub _populate_initial_data { my ($class, %opts) = @_;