2 % '' => emt('Billing'),
3 % 'ship_' => emt('Service'),
5 % foreach my $which ( '', 'ship_' ) {
6 % my $pre = $cust_main->get("${which}last") ? $which : '';
8 <FONT CLASS="fsinnerbox-title"><% $which{$which} %> <% mt('address') |h %></FONT>
9 <TABLE CLASS="fsinnerbox">
11 <TD ALIGN="right"><% mt('Contact name') |h %></TD>
12 <TD COLSPAN=5 BGCOLOR="#ffffff">
13 <% $cust_main->get("${pre}last"). ', '. $cust_main->get("${pre}first") |h %>
15 % if ( $which eq '' && $conf->exists('show_ss') ) {
16 <TD ALIGN="right"><% mt('SS#') |h %></TD>
17 <TD BGCOLOR="#ffffff"><% $cust_main->masked('ss') || ' ' %></TD>
21 % if ( $conf->exists('cust-email-high-visibility') && $which eq '') {
23 <TD ALIGN="right"><% mt('Email invoices') |h %></TD>
24 <TD BGCOLOR="#ffff00">
25 <% join(', ', grep { $_ !~ /^(POST|FAX)$/ } @invoicing_list ) || $no %>
30 % if ( $cust_main->get("${pre}company") ) {
32 <TD ALIGN="right"><% mt('Company') |h %></TD>
33 <TD COLSPAN=7 BGCOLOR="#ffffff"><% $cust_main->get("${pre}company") |h %></TD>
38 <TD ALIGN="right"><% mt('Address') |h %></TD>
39 <TD COLSPAN=7 BGCOLOR="#ffffff"><% $cust_main->get("${pre}address1") |h %></TD>
42 % if ( $cust_main->get("${pre}address2") ) {
43 % my $address2_label =
44 % ( $conf->exists('cust_main-require_address2')
45 % && ! ( $pre xor $cust_main->has_ship_address )
51 <TD ALIGN="right"><% $address2_label %></TD>
52 <TD COLSPAN=7 BGCOLOR="#ffffff"><% $cust_main->get("${pre}address2") |h %></TD>
58 <TD ALIGN="right"><% mt('City') |h %></TD>
59 <TD BGCOLOR="#ffffff"><% $cust_main->get("${pre}city") |h %></TD>
60 % if ( $cust_main->get("${pre}county") ) {
61 <TD ALIGN="right"><% mt('County') |h %></TD>
62 <TD BGCOLOR="#ffffff"><% $cust_main->get("${pre}county") |h %></TD>
64 <TD ALIGN="right"><% mt('State') |h %></TD>
65 <TD BGCOLOR="#ffffff"><% state_label( $cust_main->get("${pre}state"), $cust_main->get("${pre}country") ) |h %></TD>
66 <TD ALIGN="right"><% mt('Zip') |h %></TD>
67 <TD BGCOLOR="#ffffff"><% $cust_main->get("${pre}zip") %></TD>
70 <TD ALIGN="right"><% mt('Country') |h %></TD>
71 <TD BGCOLOR="#ffffff"><% code2country( $cust_main->get("${pre}country") ) %></TD>
74 % if ( $cust_main->get($pre.'latitude') && $cust_main->get($pre.'longitude') ) {
75 <& /elements/tr-coords.html, $cust_main->get($pre.'latitude'),
76 $cust_main->get($pre.'longitude'),
77 $cust_main->name_short,
82 % foreach my $phone (grep $cust_main->get($pre.$_), qw( daytime night mobile )){
85 <TD ALIGN="right"><% $phone_label{$phone} %></TD>
86 <TD COLSPAN=3 BGCOLOR="#ffffff">
87 <& /elements/phonenumber.html,
88 $cust_main->get($pre.$phone),
90 'calling_list_exempt'=>$cust_main->calling_list_exempt,
97 % if ( $cust_main->get("${pre}fax") ) {
99 <TD ALIGN="right"><% mt('Fax') |h %></TD>
100 <TD COLSPAN=3 BGCOLOR="#ffffff">
101 <% $cust_main->get("${pre}fax") || ' ' %>
106 % if ( $which eq '' && $conf->exists('show_stateid') ) {
108 <TD ALIGN="right"><% $stateid_label %></TD>
109 <TD BGCOLOR="#ffffff"><% $cust_main->masked('stateid') || ' ' %></TD>
110 <TD ALIGN="right"><% $stateid_state_label %></TD>
111 <TD BGCOLOR="#ffffff"><% $cust_main->stateid_state || ' ' %></TD>
116 % if ( $which ne 'ship_' ) {
124 'daytime' => ( FS::Msgcat::_gettext('daytime') =~ /^(daytime)?$/
126 : FS::Msgcat::_gettext('daytime')
129 'night' => ( FS::Msgcat::_gettext('night') =~ /^(night)?$/
131 : FS::Msgcat::_gettext('night')
134 'mobile' => ( FS::Msgcat::_gettext('mobile') =~ /^(mobile)?$/
135 ? 'Mobile Phone'
136 : FS::Msgcat::_gettext('Mobile')
140 my $stateid_label = FS::Msgcat::_gettext('stateid') =~ /^(stateid)?$/
141 ? 'Driver’s License'
142 : FS::Msgcat::_gettext('stateid');
143 my $stateid_state_label = FS::Msgcat::_gettext('stateid_state') =~ /^(stateid_state)?$/
144 ? 'Driver’s License State'
145 : FS::Msgcat::_gettext('stateid_state');
150 my( $cust_main ) = @_;
151 my $conf = new FS::Conf;
152 my @invoicing_list = $cust_main->invoicing_list;