summaryrefslogtreecommitdiff
path: root/FS/FS/phone_type.pm
diff options
context:
space:
mode:
authorChristopher Burger <burgerc@freeside.biz>2019-05-22 21:15:35 -0400
committerChristopher Burger <burgerc@freeside.biz>2019-05-22 21:15:35 -0400
commit2b199169bd62b8582eedb872b4e76bee48899e81 (patch)
tree655cd8a9cbe350298a0802e6e1385323f18919e9 /FS/FS/phone_type.pm
parenta98de57aee063b3ff737c283336f83b2e50e14a8 (diff)
RT# 77532 - created method to display phone types
Diffstat (limited to 'FS/FS/phone_type.pm')
-rw-r--r--FS/FS/phone_type.pm12
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) = @_;