X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2FUI%2FWeb%2Fsmall_custview.pm;h=e82e3326f3840432e197f059535f7c584bcc6529;hp=72af03ea429fd19ba4f0ecb266fa9cf59419da11;hb=9aee669886202be7035e6c6049fc71bc99dd3013;hpb=43f8c4ca0668a417b86e1ef8d1c15b25097bc8a4 diff --git a/FS/FS/UI/Web/small_custview.pm b/FS/FS/UI/Web/small_custview.pm index 72af03ea4..e82e3326f 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). ''. ' - '. $cust_main->status_label. ''; @@ -129,9 +133,10 @@ sub small_custview { $html .= encode_entities($cust_main->address1). '
'; $html .= encode_entities($cust_main->address2). '
' if $cust_main->address2; - $html .= encode_entities($cust_main->city). ', '. $cust_main->state. ' '. - $cust_main->zip. '
'; - $html .= $cust_main->country. '
' + $html .= encode_entities($cust_main->city) . ', ' if $cust_main->city; + $html .= encode_entities($cust_main->state). ' '. + encode_entities($cust_main->zip). '
'; + $html .= encode_entities($cust_main->country). '
' if $cust_main->country && $cust_main->country ne $countrydefault; } @@ -162,7 +167,7 @@ sub small_custview { $cust_main->ship_company, $ship->address1, $ship->address2, - ($ship->city . ', ' . $ship->state . ' ' . $ship->zip), + (($ship->city ? $ship->city . ', ' : '') . $ship->state . ' ' . $ship->zip), ($ship->country eq $countrydefault ? '' : $ship->country ), );