X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FUI%2FWeb%2Fsmall_custview.pm;h=7467b8b9042ded47dd8e64762d285c1ad517e66f;hb=2b8cc0f23f764bd53994ca3763b9c61756c96766;hp=1210da4e42103b8b242af1ed476ea3a30d32b2f9;hpb=83303105b038082cdb800a4f7322b4dd08b6fe89;p=freeside.git diff --git a/FS/FS/UI/Web/small_custview.pm b/FS/FS/UI/Web/small_custview.pm index 1210da4e4..7467b8b90 100644 --- a/FS/FS/UI/Web/small_custview.pm +++ b/FS/FS/UI/Web/small_custview.pm @@ -95,8 +95,12 @@ sub small_custview { $html = qq!' if $url; + if ( $FS::CurrentUser::CurrentUser->num_agents ) { + $html .= encode_entities($cust_main->agent->agent). ' '; + } + $html .= 'Customer #'. $cust_main->display_custnum. - ': '. encode_entities($cust_main->name). ''; + ': '. encode_entities($cust_main->name). ''. ' - '. ucfirst($cust_main->status). ''; @@ -134,16 +138,25 @@ sub small_custview { if $cust_main->country && $cust_main->country ne $countrydefault; $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 .= '';