$header2method{'Cust#'} = 'display_custnum'
if $conf->exists('cust_main-default_agent_custid');
-foreach my $phone_type ( qsearch({table=>'phone_type', order_by=>'weight'}) ) {
+foreach my $phone_type ( FS::phone_type->get_phone_types() ) {
$header2method{'Contact '.$phone_type->typename.' phone(s)'} = sub {
my $self = shift;
my $num = $phone_type->phonetypenum;
my @phones;
- foreach ($self->contact_list_name_phones) {
+ foreach (FS::cust_main::contact_list_name_phones($self)) {
my $data = [
{
'data' => $_->first.' '.$_->last.' '.FS::contact_phone::phonenum_pretty($_),
}
return \@phones;
};
-
}
my %header2colormethod = (
}
}
- 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';