diff options
author | Christopher Burger <burgerc@freeside.biz> | 2019-05-22 21:15:35 -0400 |
---|---|---|
committer | Christopher Burger <burgerc@freeside.biz> | 2019-05-23 07:46:40 -0400 |
commit | 5b9562f8e03ae6efea0c2eaa90341083744fa529 (patch) | |
tree | f976d42d3433a329a1246a99c9ef22ad5eb3ff29 /FS/FS/phone_type.pm | |
parent | a11b765362c56117c4b944096184e3e3e55bffac (diff) |
RT# 77532 - created method to display phone types
Diffstat (limited to 'FS/FS/phone_type.pm')
-rw-r--r-- | FS/FS/phone_type.pm | 12 |
1 files changed, 12 insertions, 0 deletions
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) = @_; |