3 % 'ship_' => 'Service',
5 % foreach my $which ( '', 'ship_' ) {
6 % my $pre = $cust_main->get("${which}last") ? $which : '';
8 <% $which{$which} %> address
9 <% ntable("#cccccc") %><TR><TD><% ntable("#cccccc",2) %>
11 <TD ALIGN="right">Contact name</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">Company</TD>
22 <TD COLSPAN=7 BGCOLOR="#ffffff"><% $cust_main->get("${pre}company") |h %></TD>
25 <TD ALIGN="right">Address</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">City</TD>
46 <TD BGCOLOR="#ffffff"><% $cust_main->get("${pre}city") |h %></TD>
47 % if ( $cust_main->get("${pre}county") ) {
48 <TD ALIGN="right">County</TD>
49 <TD BGCOLOR="#ffffff"><% $cust_main->get("${pre}county") |h %></TD>
51 <TD ALIGN="right">State</TD>
52 <TD BGCOLOR="#ffffff"><% state_label( $cust_main->get("${pre}state"), $cust_main->get("${pre}country") ) |h %></TD>
53 <TD ALIGN="right">Zip</TD>
54 <TD BGCOLOR="#ffffff"><% $cust_main->get("${pre}zip") %></TD>
57 <TD ALIGN="right">Country</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 <% include('/elements/phonenumber.html',
64 $cust_main->get("${pre}daytime"),
71 <TD ALIGN="right"><% $night_label %></TD>
72 <TD COLSPAN=3 BGCOLOR="#ffffff">
73 <% include('/elements/phonenumber.html',
74 $cust_main->get("${pre}night"),
81 <TD ALIGN="right">Fax</TD>
82 <TD COLSPAN=3 BGCOLOR="#ffffff">
83 <% $cust_main->get("${pre}fax") || ' ' %>
86 % if ( $which eq '' && $conf->exists('show_stateid') ) {
88 <TD ALIGN="right"><% $stateid_label %></TD>
89 <TD BGCOLOR="#ffffff"><% $cust_main->masked('stateid') || ' ' %></TD>
90 <TD ALIGN="right"><% $stateid_state_label %></TD>
91 <TD BGCOLOR="#ffffff"><% $cust_main->stateid_state || ' ' %></TD>
94 </TABLE></TD></TR></TABLE>
95 % if ( $which ne 'ship_' ) {
99 <% include('contacts_new.html', $cust_main) %>
102 my $daytime_label = FS::Msgcat::_gettext('daytime') =~ /^(daytime)?$/
104 : FS::Msgcat::_gettext('daytime');
105 my $night_label = FS::Msgcat::_gettext('night') =~ /^(night)?$/
107 : FS::Msgcat::_gettext('night');
108 my $stateid_label = FS::Msgcat::_gettext('stateid') =~ /^(stateid)?$/
109 ? 'Driver’s License'
110 : FS::Msgcat::_gettext('stateid');
111 my $stateid_state_label = FS::Msgcat::_gettext('stateid_state') =~ /^(stateid_state)?$/
112 ? 'Driver’s License State'
113 : FS::Msgcat::_gettext('stateid_state');
118 my( $cust_main ) = @_;
119 my $conf = new FS::Conf;