X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2FUI%2FWeb%2Fsmall_custview.pm;h=85bee7dadd8642f64826136a5a763c03bfe8fd02;hp=e82e3326f3840432e197f059535f7c584bcc6529;hb=8b7aa84ac466a5094f54fba06e80bab45599bb8d;hpb=374f5934e8dba44b7abb8041af7fc9e640e316a9 diff --git a/FS/FS/UI/Web/small_custview.pm b/FS/FS/UI/Web/small_custview.pm index e82e3326f..85bee7dad 100644 --- a/FS/FS/UI/Web/small_custview.pm +++ b/FS/FS/UI/Web/small_custview.pm @@ -142,16 +142,25 @@ sub small_custview { } $html .= ''; - if ( $cust_main->daytime && $cust_main->night ) { - $html .= ( FS::Msgcat::_gettext('daytime') || 'Day' ). - ' '. $cust_main->daytime. - '
'. ( FS::Msgcat::_gettext('night') || 'Night' ). - ' '. $cust_main->night; - } elsif ( $cust_main->daytime || $cust_main->night ) { - $html .= $cust_main->daytime || $cust_main->night; + + my $num_numbers = 0; + $num_numbers++ foreach grep $cust_main->$_(), qw( daytime night mobile ); + if ( $num_numbers > 1 ) { + $html .= ucfirst( FS::Msgcat::_gettext('daytime') ). + ' '. $cust_main->daytime. '
' + if $cust_main->daytime; + $html .= ucfirst( FS::Msgcat::_gettext('night') ). + ' '. $cust_main->night. '
' + if $cust_main->night; + $html .= ucfirst( FS::Msgcat::_gettext('mobile') ). + ' '. $cust_main->mobile. '
' + if $cust_main->night; + } elsif ( $num_numbers ) { # == 1 ) { + $html .= ( $cust_main->daytime || $cust_main->night || $cust_main->mobile ). + '
'; } if ( $cust_main->fax ) { - $html .= '
Fax '. $cust_main->fax; + $html .= 'Fax '. $cust_main->fax; } $html .= '';