[freeside-commits] freeside/FS/FS/UI/Web small_custview.pm, 1.4, 1.5

Ivan,,, ivan at wavetail.420.am
Sat Jul 17 15:14:41 PDT 2010


Update of /home/cvs/cvsroot/freeside/FS/FS/UI/Web
In directory wavetail.420.am:/tmp/cvs-serv9182/FS/FS/UI/Web

Modified Files:
	small_custview.pm 
Log Message:
customer tags, RT#9192

Index: small_custview.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/UI/Web/small_custview.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -w -d -r1.4 -r1.5
--- small_custview.pm	10 Oct 2008 01:15:49 -0000	1.4
+++ small_custview.pm	17 Jul 2010 22:14:39 -0000	1.5
@@ -3,6 +3,7 @@
 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;
@@ -35,7 +36,26 @@
 
   $html .= 'Customer #<B>'. $cust_main->display_custnum. '</B></A>'.
     ' - <B><FONT COLOR="#'. $cust_main->statuscolor. '">'.
-    ucfirst($cust_main->status). '</FONT></B>'.
+    ucfirst($cust_main->status). '</FONT></B>';
+
+  my @part_tag = $cust_main->part_tag;
+  if ( @part_tag ) {
+    $html .= '<TABLE>';
+    foreach my $part_tag ( @part_tag ) {
+      $html .= '<TR><TD>'.
+               '<FONT '. ( length($part_tag->tagcolor)
+                           ? 'STYLE="background-color:#'.$part_tag->tagcolor.'"'
+                           : ''
+                         ).
+               '>'.
+                 encode_entities($part_tag->tagname.': '. $part_tag->tagdesc).
+               '</FONT>'.
+               '</TD></TR>';
+    }
+    $html .= '</TABLE>';
+  }
+
+  $html .=
     ntable('#e8e8e8'). '<TR><TD VALIGN="top">'. ntable("#cccccc",2).
     '<TR><TD ALIGN="right" VALIGN="top">Billing<BR>Address</TD><TD BGCOLOR="#ffffff">'.
     $cust_main->getfield('last'). ', '. $cust_main->first. '<BR>';



More information about the freeside-commits mailing list