From 5b9562f8e03ae6efea0c2eaa90341083744fa529 Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Wed, 22 May 2019 21:15:35 -0400 Subject: RT# 77532 - created method to display phone types --- FS/FS/phone_type.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'FS/FS/phone_type.pm') diff --git a/FS/FS/phone_type.pm b/FS/FS/phone_type.pm index ded6b91..3d9dced 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) = @_; -- cgit v1.1