-Billing address
-<%= ntable("#cccccc") %><TR><TD><%= ntable("#cccccc",2) %>
-<TR>
- <TD ALIGN="right">Contact name</TD>
- <TD COLSPAN=3 BGCOLOR="#ffffff">
- <%= $cust_main->last. ', '. $cust_main->first %>
- </TD>
-<% if ( $conf->exists('show_ss') ) { %>
- <TD ALIGN="right">SS#</TD>
- <TD BGCOLOR="#ffffff"><%= $cust_main->ss || ' ' %></TD>
-<% } %>
-</TR>
-<TR>
- <TD ALIGN="right">Company</TD>
- <TD COLSPAN=5 BGCOLOR="#ffffff"><%= $cust_main->company %></TD>
-</TR>
-<TR>
- <TD ALIGN="right">Address</TD>
- <TD COLSPAN=5 BGCOLOR="#ffffff"><%= $cust_main->address1 %></TD>
-</TR>
-<% if ( $cust_main->address2 ) { %>
-<TR>
- <TD ALIGN="right"> </TD>
- <TD COLSPAN=5 BGCOLOR="#ffffff"><%= $cust_main->address2 %></TD>
-</TR>
-<% } %>
-<TR>
- <TD ALIGN="right">City</TD>
- <TD BGCOLOR="#ffffff"><%= $cust_main->city %></TD>
- <TD ALIGN="right">State</TD>
- <TD BGCOLOR="#ffffff"><%= $cust_main->state %></TD>
- <TD ALIGN="right">Zip</TD>
- <TD BGCOLOR="#ffffff"><%= $cust_main->zip %></TD>
-</TR>
-<TR>
- <TD ALIGN="right">Country</TD>
- <TD BGCOLOR="#ffffff"><%= $cust_main->country %></TD>
-</TR>
-<%
- my $daytime_label = FS::Msgcat::_gettext('daytime') =~ /^(daytime)?$/
- ? 'Day Phone'
- : FS::Msgcat::_gettext('daytime');
- my $night_label = FS::Msgcat::_gettext('night') =~ /^(night)?$/
- ? 'Night Phone'
- : FS::Msgcat::_gettext('night');
-%>
-<TR>
- <TD ALIGN="right"><%= $daytime_label %></TD>
- <TD COLSPAN=5 BGCOLOR="#ffffff">
- <%= $cust_main->daytime || ' ' %>
- </TD>
-</TR>
-<TR>
- <TD ALIGN="right"><%= $night_label %></TD>
- <TD COLSPAN=5 BGCOLOR="#ffffff">
- <%= $cust_main->night || ' ' %>
- </TD>
-</TR>
-<TR>
- <TD ALIGN="right">Fax</TD>
- <TD COLSPAN=5 BGCOLOR="#ffffff">
- <%= $cust_main->fax || ' ' %>
- </TD>
+%# Locations (possibly break this out)
+% my @which = ('bill', 'ship');
+% while (@which) {
+% my $this = shift @which;
+% my $method = $this.'_location';
+% my $location = $cust_main->$method;
+<FONT CLASS="fsinnerbox-title"><% mt( $addr_label{$this} ) |h %>
+% if ( $this eq 'ship' and
+% $cust_main->bill_locationnum == $cust_main->ship_locationnum )
+% {
+ (<% mt('same as billing') %>)
+% }
+</FONT>
+<TABLE CLASS="fsinnerbox">
+
+% if ( $this eq 'bill' ) {
+% #billing contact fields
+ <TR>
+ <TD ALIGN="right"><% mt('Contact name') |h %></TD>
+ <TD COLSPAN=5 BGCOLOR="#ffffff"><% $cust_main->contact |h %></TD>
+% if ( $conf->exists('show_ss') ) {
+ <TD ALIGN="right"><% mt('SS#') |h %></TD>
+ <TD BGCOLOR="#ffffff"><% $conf->exists('unmask_ss')
+ ? $cust_main->ss
+ : $cust_main->masked('ss') || ' ' %></TD>
+% }
+ </TR>
+% if ( $conf->exists('cust_main-enable_spouse') and
+% ($cust_main->spouse_last or $cust_main->spouse_first) ) {
+ <TR>
+ <TD ALIGN="right"><% mt('Spouse') |h %></TD>
+ <TD COLSPAN=5 BGCOLOR="#ffffff">
+ <% join(', ', grep $_,
+ $cust_main->spouse_last, $cust_main->spouse_first) %>
+ </TD>
+ </TR>
+% }
+% if ( $conf->exists('cust-email-high-visibility') ) {
+ <TR>
+ <TD ALIGN="right"><% mt('Email address(es)') |h %></TD>
+ <TD BGCOLOR="#ffff00">
+ <% $cust_main->invoicing_list_emailonly_scalar || $no %>
+ </TD>
+ </TR>
+% }
+% if ( $cust_main->company ) {
+ <TR>
+ <TD ALIGN="right"><% mt('Company') |h %></TD>
+ <TD COLSPAN=7 BGCOLOR="#ffffff"><% $cust_main->company |h %></TD>
+ </TR>
+% }
+% } elsif ( $this eq 'ship' ) {
+% if ( $cust_main->ship_company ) { # mostly obsolete these days...
+ <TR>
+ <TD ALIGN="right"><% mt('Company') |h %></TD>
+ <TD COLSPAN=7 BGCOLOR="#ffffff"><% $cust_main->ship_company |h %></TD>
+ </TR>
+% }
+% }
+% # now the actual address
+<TR>
+ <TD ALIGN="right"><% mt('Address') |h %></TD>
+ <TD COLSPAN=7 BGCOLOR="#ffffff"><% $location->address1 |h %></TD>