X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fphone_type.pm;h=de565270ae7ad88d6acc6f83291df51e4c4eea95;hp=d2ef465bdf3789f4026c3028daa24f94ed6ef992;hb=20f03d52cc6c930f610c0b4466eeeeda54fdbb40;hpb=63a268637b2d51a8766412617724b9436439deb6 diff --git a/FS/FS/phone_type.pm b/FS/FS/phone_type.pm index d2ef465bd..de565270a 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 { + ## not using Home and Fax right now. false laziness with /elements/contact.html + my @phone_types = qsearch({table=>'phone_type', order_by=>'ORDER BY weight DESC', extra_sql => " WHERE typename NOT IN ('Home','Fax')"}); + return @phone_types; +} + # Used by FS::Setup to initialize a new database. sub _populate_initial_data { my ($class, %opts) = @_;