X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FCGI.pm;h=9dc635ad22c41960f708e28477f1e8e1ebfa2172;hb=f441bdef352ddd432e305da35e80813ca30e517f;hp=1ddc62c7a55641ea3f212300234312abdce0cedb;hpb=3913f6d159b5b8110061690b7c97642c27abf7eb;p=freeside.git diff --git a/FS/FS/CGI.pm b/FS/FS/CGI.pm index 1ddc62c7a..9dc635ad2 100644 --- a/FS/FS/CGI.pm +++ b/FS/FS/CGI.pm @@ -252,10 +252,11 @@ Returns HTML tag for beginning an (invisible) table. sub itable { my $col = shift; my $cellspacing = shift || 0; + my $width = ( scalar(@_) && shift ) ? '' : 'WIDTH="100%"'; #bah if ( $col ) { - qq!!; + qq!
!; } else { - qq!
!; + qq!
!; } } @@ -276,7 +277,7 @@ sub ntable { } -=item small_custview CUSTNUM || CUST_MAIN_OBJECT, COUNTRYDEFAULT +=item small_custview CUSTNUM || CUST_MAIN_OBJECT, COUNTRYDEFAULT, NOBALANCE_FLAG Sheesh. I should just switch to Mason. @@ -288,15 +289,16 @@ sub small_custview { my $arg = shift; my $countrydefault = shift || 'US'; + my $nobalance = shift; my $cust_main = ref($arg) ? $arg : qsearchs('cust_main', { 'custnum' => $arg } ) or die "unknown custnum $arg"; - my $html = 'Customer #'. $cust_main->custnum. ''. + my $html = 'Customer #'. $cust_main->custnum. ''. ' - '. ucfirst($cust_main->status). ''. - ntable('#e8e8e8'). '
'. ntable("#cccccc",2). + ntable('#e8e8e8'). '
'. ntable("#cccccc",2). '
Billing
Address
'. $cust_main->getfield('last'). ', '. $cust_main->first. '
'; @@ -327,7 +329,7 @@ sub small_custview { my $pre = $cust_main->ship_last ? 'ship_' : ''; - $html .= '
'. ntable("#cccccc",2). + $html .= ''. ntable("#cccccc",2). '
Service
Address
'. $cust_main->get("${pre}last"). ', '. $cust_main->get("${pre}first"). '
'; @@ -365,7 +367,8 @@ sub small_custview { $html .= '
'; - $html .= '
Balance: $'. $cust_main->balance. '
'; + $html .= '
Balance: $'. $cust_main->balance. '
' + unless $nobalance; # last payment might be good here too?