X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fphone_type.pm;fp=FS%2FFS%2Fphone_type.pm;h=3d9dced6f8e9c013fac4d26ce2a8446e2c7fc2c9;hb=2b199169bd62b8582eedb872b4e76bee48899e81;hp=ded6b918ad66f7223a9bed1da7c1a1512c4e4eb2;hpb=a98de57aee063b3ff737c283336f83b2e50e14a8;p=freeside.git diff --git a/FS/FS/phone_type.pm b/FS/FS/phone_type.pm index ded6b918a..3d9dced6f 100644 --- a/FS/FS/phone_type.pm +++ b/FS/FS/phone_type.pm @@ -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) = @_;