3 % 'ship_' => mt('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">SS#</TD>
17 <TD BGCOLOR="#ffffff"><% $cust_main->masked('ss') || ' ' %></TD>
21 <TD ALIGN="right"><% mt('Company') |h %></TD>
22 <TD COLSPAN=7 BGCOLOR="#ffffff"><% $cust_main->get("${pre}company") |h %></TD>
25 <TD ALIGN="right"><% mt('Address') |h %></TD>
26 <TD COLSPAN=7 BGCOLOR="#ffffff"><% $cust_main->get("${pre}address1") |h %></TD>
29 % if ( $cust_main->get("${pre}address2") ) {
30 % my $address2_label =
31 % ( $conf->exists('cust_main-require_address2')
32 % && ! ( $pre xor $cust_main->has_ship_address )
38 <TD ALIGN="right"><% $address2_label %></TD>
39 <TD COLSPAN=7 BGCOLOR="#ffffff"><% $cust_main->get("${pre}address2") |h %></TD>
45 <TD ALIGN="right"><% mt('City') |h %></TD>
46 <TD BGCOLOR="#ffffff"><% $cust_main->get("${pre}city") |h %></TD>
47 % if ( $cust_main->get("${pre}county") ) {
48 <TD ALIGN="right"><% mt('County') |h %></TD>
49 <TD BGCOLOR="#ffffff"><% $cust_main->get("${pre}county") |h %></TD>
51 <TD ALIGN="right"><% mt('State') |h %></TD>
52 <TD BGCOLOR="#ffffff"><% state_label( $cust_main->get("${pre}state"), $cust_main->get("${pre}country") ) |h %></TD>
53 <TD ALIGN="right"><% mt('Zip') |h %></TD>
54 <TD BGCOLOR="#ffffff"><% $cust_main->get("${pre}zip") %></TD>
57 <TD ALIGN="right"><% mt('Country') |h %></TD>
58 <TD BGCOLOR="#ffffff"><% code2country( $cust_main->get("${pre}country") ) %></TD>
61 <TD ALIGN="right"><% $daytime_label %></TD>
62 <TD COLSPAN=3 BGCOLOR="#ffffff">
63 <& /elements/phonenumber.html,
64 $cust_main->get("${pre}daytime"),
70 <TD ALIGN="right"><% $night_label %></TD>
71 <TD COLSPAN=3 BGCOLOR="#ffffff">
72 <& /elements/phonenumber.html,
73 $cust_main->get("${pre}night"),
79 <TD ALIGN="right"><% mt('Fax') |h %></TD>
80 <TD COLSPAN=3 BGCOLOR="#ffffff">
81 <% $cust_main->get("${pre}fax") || ' ' %>
84 % if ( $which eq '' && $conf->exists('show_stateid') ) {
86 <TD ALIGN="right"><% $stateid_label %></TD>
87 <TD BGCOLOR="#ffffff"><% $cust_main->masked('stateid') || ' ' %></TD>
88 <TD ALIGN="right"><% $stateid_state_label %></TD>
89 <TD BGCOLOR="#ffffff"><% $cust_main->stateid_state || ' ' %></TD>
92 </TABLE></TD></TR></TABLE>
93 % if ( $which ne 'ship_' ) {
97 <& contacts_new.html, $cust_main &>
100 my $daytime_label = FS::Msgcat::_gettext('daytime') =~ /^(daytime)?$/
102 : FS::Msgcat::_gettext('daytime');
103 my $night_label = FS::Msgcat::_gettext('night') =~ /^(night)?$/
105 : FS::Msgcat::_gettext('night');
106 my $stateid_label = FS::Msgcat::_gettext('stateid') =~ /^(stateid)?$/
107 ? 'Driver’s License'
108 : FS::Msgcat::_gettext('stateid');
109 my $stateid_state_label = FS::Msgcat::_gettext('stateid_state') =~ /^(stateid_state)?$/
110 ? 'Driver’s License State'
111 : FS::Msgcat::_gettext('stateid_state');
116 my( $cust_main ) = @_;
117 my $conf = new FS::Conf;