2 % '' => emt('Billing'),
3 % 'ship_' => emt('Service'),
5 % foreach my $which ( '', 'ship_' ) {
6 % my $pre = $cust_main->get("${which}last") ? $which : '';
8 <% $which{$which} %> <% mt('address') |h %>
9 <% ntable("#cccccc") %><TR><TD><% ntable("#cccccc",2) %>
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 address(es)') |h %></TD>
24 <TD BGCOLOR="#ffff00">
25 <% join(', ', grep { $_ !~ /^(POST|FAX)$/ } @invoicing_list ) || $no %>
31 <TD ALIGN="right"><% mt('Company') |h %></TD>
32 <TD COLSPAN=7 BGCOLOR="#ffffff"><% $cust_main->get("${pre}company") |h %></TD>
35 <TD ALIGN="right"><% mt('Address') |h %></TD>
36 <TD COLSPAN=7 BGCOLOR="#ffffff"><% $cust_main->get("${pre}address1") |h %></TD>
39 % if ( $cust_main->get("${pre}address2") ) {
40 % my $address2_label =
41 % ( $conf->exists('cust_main-require_address2')
42 % && ! ( $pre xor $cust_main->has_ship_address )
48 <TD ALIGN="right"><% $address2_label %></TD>
49 <TD COLSPAN=7 BGCOLOR="#ffffff"><% $cust_main->get("${pre}address2") |h %></TD>
55 <TD ALIGN="right"><% mt('City') |h %></TD>
56 <TD BGCOLOR="#ffffff"><% $cust_main->get("${pre}city") |h %></TD>
57 % if ( $cust_main->get("${pre}county") ) {
58 <TD ALIGN="right"><% mt('County') |h %></TD>
59 <TD BGCOLOR="#ffffff"><% $cust_main->get("${pre}county") |h %></TD>
61 <TD ALIGN="right"><% mt('State') |h %></TD>
62 <TD BGCOLOR="#ffffff"><% state_label( $cust_main->get("${pre}state"), $cust_main->get("${pre}country") ) |h %></TD>
63 <TD ALIGN="right"><% mt('Zip') |h %></TD>
64 <TD BGCOLOR="#ffffff"><% $cust_main->get("${pre}zip") %></TD>
67 <TD ALIGN="right"><% mt('Country') |h %></TD>
68 <TD BGCOLOR="#ffffff"><% code2country( $cust_main->get("${pre}country") ) %></TD>
71 % if ( $cust_main->get($pre.'latitude') && $cust_main->get($pre.'longitude') ) {
72 <& /elements/tr-coords.html, $cust_main->get($pre.'latitude'),
73 $cust_main->get($pre.'longitude'),
74 $cust_main->name_short,
80 <TD ALIGN="right"><% $daytime_label %></TD>
81 <TD COLSPAN=3 BGCOLOR="#ffffff">
82 <& /elements/phonenumber.html,
83 $cust_main->get("${pre}daytime"),
85 'calling_list_exempt'=>$cust_main->calling_list_exempt,
90 <TD ALIGN="right"><% $night_label %></TD>
91 <TD COLSPAN=3 BGCOLOR="#ffffff">
92 <& /elements/phonenumber.html,
93 $cust_main->get("${pre}night"),
95 'calling_list_exempt'=>$cust_main->calling_list_exempt,
100 <TD ALIGN="right"><% $mobile_label %></TD>
101 <TD COLSPAN=3 BGCOLOR="#ffffff">
102 <& /elements/phonenumber.html,
103 $cust_main->get("${pre}mobile"),
105 'calling_list_exempt'=>$cust_main->calling_list_exempt,
110 <TD ALIGN="right"><% mt('Fax') |h %></TD>
111 <TD COLSPAN=3 BGCOLOR="#ffffff">
112 <% $cust_main->get("${pre}fax") || ' ' %>
115 % if ( $which eq '' && $conf->exists('show_stateid') ) {
117 <TD ALIGN="right"><% $stateid_label %></TD>
118 <TD BGCOLOR="#ffffff"><% $cust_main->masked('stateid') || ' ' %></TD>
119 <TD ALIGN="right"><% $stateid_state_label %></TD>
120 <TD BGCOLOR="#ffffff"><% $cust_main->stateid_state || ' ' %></TD>
123 </TABLE></TD></TR></TABLE>
124 % if ( $which ne 'ship_' ) {
128 <& contacts_new.html, $cust_main &>
131 my $daytime_label = FS::Msgcat::_gettext('daytime') =~ /^(daytime)?$/
133 : FS::Msgcat::_gettext('daytime');
134 my $night_label = FS::Msgcat::_gettext('night') =~ /^(night)?$/
136 : FS::Msgcat::_gettext('night');
137 my $mobile_label = FS::Msgcat::_gettext('mobile') =~ /^(mobile)?$/
138 ? 'Mobile Phone'
139 : FS::Msgcat::_gettext('Mobile');
141 my $stateid_label = FS::Msgcat::_gettext('stateid') =~ /^(stateid)?$/
142 ? 'Driver’s License'
143 : FS::Msgcat::_gettext('stateid');
144 my $stateid_state_label = FS::Msgcat::_gettext('stateid_state') =~ /^(stateid_state)?$/
145 ? 'Driver’s License State'
146 : FS::Msgcat::_gettext('stateid_state');
151 my( $cust_main ) = @_;
152 my $conf = new FS::Conf;
153 my @invoicing_list = $cust_main->invoicing_list;