RT# 83436 - fixed Advanced Broadband Service Report when displaying phone numbers
[freeside.git] / FS / FS / UI / Web.pm
index 9eb49c4..2d12f7d 100644 (file)
@@ -357,13 +357,13 @@ sub cust_header {
   $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($_),
@@ -373,7 +373,6 @@ foreach my $phone_type ( qsearch({table=>'phone_type', order_by=>'weight'}) ) {
     }
   return \@phones;
   };
-
 }
 
   my %header2colormethod = (
@@ -476,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';