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>
20 % if ( $conf->exists('cust-email-high-visibility') && $which eq '') {
22 <TD ALIGN="right">Email invoices</TD>
23 <TD BGCOLOR="#ffff00">
24 <% join(', ', grep { $_ !~ /^(POST|FAX)$/ } @invoicing_list ) || 'no' %>
29 <TD ALIGN="right">Company</TD>
30 <TD COLSPAN=7 BGCOLOR="#ffffff"><% $cust_main->get("${pre}company") |h %></TD>
33 <TD ALIGN="right">Address</TD>
34 <TD COLSPAN=7 BGCOLOR="#ffffff"><% $cust_main->get("${pre}address1") |h %></TD>
37 % if ( $cust_main->get("${pre}address2") ) {
38 % my $address2_label =
39 % ( $conf->exists('cust_main-require_address2')
40 % && ! ( $pre xor $cust_main->has_ship_address )
46 <TD ALIGN="right"><% $address2_label %></TD>
47 <TD COLSPAN=7 BGCOLOR="#ffffff"><% $cust_main->get("${pre}address2") |h %></TD>
53 <TD ALIGN="right">City</TD>
54 <TD BGCOLOR="#ffffff"><% $cust_main->get("${pre}city") |h %></TD>
55 % if ( $cust_main->get("${pre}county") ) {
56 <TD ALIGN="right">County</TD>
57 <TD BGCOLOR="#ffffff"><% $cust_main->get("${pre}county") |h %></TD>
59 <TD ALIGN="right">State</TD>
60 <TD BGCOLOR="#ffffff"><% state_label( $cust_main->get("${pre}state"), $cust_main->get("${pre}country") ) |h %></TD>
61 <TD ALIGN="right">Zip</TD>
62 <TD BGCOLOR="#ffffff"><% $cust_main->get("${pre}zip") %></TD>
65 <TD ALIGN="right">Country</TD>
66 <TD BGCOLOR="#ffffff"><% code2country( $cust_main->get("${pre}country") ) %></TD>
69 <TD ALIGN="right"><% $daytime_label %></TD>
70 <TD COLSPAN=3 BGCOLOR="#ffffff">
71 <% include('/elements/phonenumber.html',
72 $cust_main->get("${pre}daytime"),
79 <TD ALIGN="right"><% $night_label %></TD>
80 <TD COLSPAN=3 BGCOLOR="#ffffff">
81 <% include('/elements/phonenumber.html',
82 $cust_main->get("${pre}night"),
89 <TD ALIGN="right">Fax</TD>
90 <TD COLSPAN=3 BGCOLOR="#ffffff">
91 <% $cust_main->get("${pre}fax") || ' ' %>
94 % if ( $which eq '' && $conf->exists('show_stateid') ) {
96 <TD ALIGN="right"><% $stateid_label %></TD>
97 <TD BGCOLOR="#ffffff"><% $cust_main->masked('stateid') || ' ' %></TD>
98 <TD ALIGN="right"><% $stateid_state_label %></TD>
99 <TD BGCOLOR="#ffffff"><% $cust_main->stateid_state || ' ' %></TD>
102 </TABLE></TD></TR></TABLE>
103 % if ( $which ne 'ship_' ) {
110 my $daytime_label = FS::Msgcat::_gettext('daytime') =~ /^(daytime)?$/
112 : FS::Msgcat::_gettext('daytime');
113 my $night_label = FS::Msgcat::_gettext('night') =~ /^(night)?$/
115 : FS::Msgcat::_gettext('night');
116 my $stateid_label = FS::Msgcat::_gettext('stateid') =~ /^(stateid)?$/
117 ? 'Driver’s License'
118 : FS::Msgcat::_gettext('stateid');
119 my $stateid_state_label = FS::Msgcat::_gettext('stateid_state') =~ /^(stateid_state)?$/
120 ? 'Driver’s License State'
121 : FS::Msgcat::_gettext('stateid_state');
126 my( $cust_main ) = @_;
127 my $conf = new FS::Conf;
128 my @invoicing_list = $cust_main->invoicing_list;