From 5b0df166c22e13eba83fabee858846ead6a54141 Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Tue, 28 May 2019 10:55:29 -0400 Subject: RT# 77532 - fixed error where cust main fax not showing, and fixed checking of phonetypenum --- FS/FS/ConfDefaults.pm | 2 +- FS/FS/UI/Web.pm | 2 +- FS/FS/cust_main/Search.pm | 2 +- FS/FS/phone_type.pm | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'FS') diff --git a/FS/FS/ConfDefaults.pm b/FS/FS/ConfDefaults.pm index d81e8e2dc..34987f4b4 100644 --- a/FS/FS/ConfDefaults.pm +++ b/FS/FS/ConfDefaults.pm @@ -36,7 +36,7 @@ sub cust_fields_avail { ( 'Agent | Agent Cust# or Cust# | Cust. Status | Customer' => 'Agent | Agent Cust# | Status | Last, First or Company (Last, First)', - "Customer | Day phone | Night phone | Mobile phone | Fax number | Contact phone(s)" => + 'Customer | Day phone | Night phone | Mobile phone | Fax number | Contact phone(s)' => 'Customer | (all phones)', 'Cust# | Customer | Day phone | Night phone | Mobile phone | Fax number | Contact phone(s)' => 'custnum | Customer | (all phones)', diff --git a/FS/FS/UI/Web.pm b/FS/FS/UI/Web.pm index 76071d900..84f397920 100644 --- a/FS/FS/UI/Web.pm +++ b/FS/FS/UI/Web.pm @@ -475,7 +475,7 @@ sub cust_sql_fields { } } - foreach my $field (qw(daytime night mobile fax )) { + foreach my $field (qw(daytime night mobile fax)) { push @fields, $field if (grep { $_ eq $field } @cust_fields); } push @fields, 'agent_custid'; diff --git a/FS/FS/cust_main/Search.pm b/FS/FS/cust_main/Search.pm index 479ebf5c4..25216c6d6 100644 --- a/FS/FS/cust_main/Search.pm +++ b/FS/FS/cust_main/Search.pm @@ -793,7 +793,7 @@ sub search { # phones ## - foreach my $phonet (qw(daytime night mobile)) { + foreach my $phonet (qw(daytime night mobile fax)) { if ($params->{$phonet}) { $params->{$phonet} =~ s/\D//g; $params->{$phonet} =~ /^(\d{3})(\d{3})(\d{4})(\d*)$/ diff --git a/FS/FS/phone_type.pm b/FS/FS/phone_type.pm index 3d9dced6f..de565270a 100644 --- a/FS/FS/phone_type.pm +++ b/FS/FS/phone_type.pm @@ -98,8 +98,8 @@ 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')"}); + ## 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; } -- cgit v1.2.1