X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FUI%2FWeb%2Fsmall_custview.pm;h=36dd30c6dfc621d920b4922f6e2113aa7640072f;hb=74e058c8a010ef6feb539248a550d0bb169c1e94;hp=80540af2a6ae10d4d866b48434390c7f9de5a600;hpb=3800ef16a8afab08bcec3f2f3c9ad7dc6657069d;p=freeside.git diff --git a/FS/FS/UI/Web/small_custview.pm b/FS/FS/UI/Web/small_custview.pm index 80540af2a..36dd30c6d 100644 --- a/FS/FS/UI/Web/small_custview.pm +++ b/FS/FS/UI/Web/small_custview.pm @@ -3,6 +3,7 @@ package FS::UI::Web::small_custview; use strict; use vars qw(@EXPORT_OK @ISA); use Exporter; +use HTML::Entities; use FS::Msgcat; use FS::Record qw(qsearchs); use FS::cust_main; @@ -33,9 +34,28 @@ sub small_custview { $html = qq!View ' if $url; - $html .= 'Customer #'. $cust_main->custnum. ''. + $html .= 'Customer #'. $cust_main->display_custnum. ''. ' - '. - ucfirst($cust_main->status). ''. + ucfirst($cust_main->status). ''; + + my @part_tag = $cust_main->part_tag; + if ( @part_tag ) { + $html .= ''; + foreach my $part_tag ( @part_tag ) { + $html .= ''; + } + $html .= '
'. + 'tagcolor) + ? 'STYLE="background-color:#'.$part_tag->tagcolor.'"' + : '' + ). + '>'. + encode_entities($part_tag->tagname.': '. $part_tag->tagdesc). + ''. + '
'; + } + + $html .= ntable('#e8e8e8'). ''. ntable("#cccccc",2). 'Billing
Address'. $cust_main->getfield('last'). ', '. $cust_main->first. '
'; @@ -112,3 +132,18 @@ sub small_custview { $html; } +#bah. don't want to pull in all of FS::CGI, that's the whole problem in the +#first place +sub ntable { + my $col = shift; + my $cellspacing = shift || 0; + if ( $col ) { + qq!!; + } else { + '
'; + } + +} + +1; +