projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f4fc05a
)
RT# 77532 - fixed search to use phone type from database
author
Christopher Burger
<burgerc@freeside.biz>
Tue, 26 Sep 2017 17:43:31 +0000
(13:43 -0400)
committer
Christopher Burger
<burgerc@freeside.biz>
Tue, 20 Nov 2018 21:42:55 +0000
(16:42 -0500)
httemplate/search/contact.html
patch
|
blob
|
history
diff --git
a/httemplate/search/contact.html
b/httemplate/search/contact.html
index
1f73858
..
2121527
100644
(file)
--- a/
httemplate/search/contact.html
+++ b/
httemplate/search/contact.html
@@
-46,22
+46,25
@@
my $DEBUG = 0;
my $work_phone_sub = sub {
my $contact = shift;
my $work_phone_sub = sub {
my $contact = shift;
+ my $phone_type = qsearchs('phone_type', { 'typename' => 'Work' });
#can't because contactnum is in the wrong field
#can't because contactnum is in the wrong field
- my @contact_workphone = qsearch('contact_phone', { 'contactnum' => $contact->contact_contactnum, 'phonetypenum' =>
'1'
} );
+ my @contact_workphone = qsearch('contact_phone', { 'contactnum' => $contact->contact_contactnum, 'phonetypenum' =>
$phone_type->phonetypenum
} );
join(', ', map $_->phonenum, @contact_workphone);
};
my $mobile_phone_sub = sub {
my $contact = shift;
join(', ', map $_->phonenum, @contact_workphone);
};
my $mobile_phone_sub = sub {
my $contact = shift;
+ my $phone_type = qsearchs('phone_type', { 'typename' => 'Mobile' });
#can't because contactnum is in the wrong field
#can't because contactnum is in the wrong field
- my @contact_mobilephone = qsearch('contact_phone', { 'contactnum' => $contact->contact_contactnum, 'phonetypenum' =>
'3'
} );
+ my @contact_mobilephone = qsearch('contact_phone', { 'contactnum' => $contact->contact_contactnum, 'phonetypenum' =>
$phone_type->phonetypenum
} );
join(', ', map $_->phonenum, @contact_mobilephone);
};
my $home_phone_sub = sub {
my $contact = shift;
join(', ', map $_->phonenum, @contact_mobilephone);
};
my $home_phone_sub = sub {
my $contact = shift;
+ my $phone_type = qsearchs('phone_type', { 'typename' => 'Home' });
#can't because contactnum is in the wrong field
#can't because contactnum is in the wrong field
- my @contact_homephone = qsearch('contact_phone', { 'contactnum' => $contact->contact_contactnum, 'phonetypenum' =>
'2'
} );
+ my @contact_homephone = qsearch('contact_phone', { 'contactnum' => $contact->contact_contactnum, 'phonetypenum' =>
$phone_type->phonetypenum
} );
join(', ', map $_->phonenum, @contact_homephone);
};
join(', ', map $_->phonenum, @contact_homephone);
};