% my %which = ( % '' => emt('Billing'), % 'ship_' => emt('Service'), % ); % foreach my $which ( '', 'ship_' ) { % my $pre = $cust_main->get("${which}last") ? $which : ''; <% $which{$which} %> <% mt('address') |h %> % if ( $which eq '' && $conf->exists('show_ss') ) { % } % if ( $conf->exists('cust-email-high-visibility') && $which eq '') { % } % if ( $cust_main->get("${pre}company") ) { % } % if ( $cust_main->get("${pre}address2") ) { % my $address2_label = % ( $conf->exists('cust_main-require_address2') % && ! ( $pre xor $cust_main->has_ship_address ) % ) % ? emt('Unit #') % : ' '; % } % if ( $cust_main->get("${pre}county") ) { % } % if ( $cust_main->get($pre.'latitude') && $cust_main->get($pre.'longitude') ) { <& /elements/tr-coords.html, $cust_main->get($pre.'latitude'), $cust_main->get($pre.'longitude'), $cust_main->name_short, $cust_main->agentnum, &> % } % foreach my $phone (grep $cust_main->get($pre.$_), qw( daytime night mobile )){ % } % if ( $cust_main->get("${pre}fax") ) { % } % if ( $which eq '' && $conf->exists('show_stateid') ) { % }
<% mt('Contact name') |h %> <% $cust_main->get("${pre}last"). ', '. $cust_main->get("${pre}first") |h %> <% mt('SS#') |h %> <% $cust_main->masked('ss') || ' ' %>
<% mt('Email invoices') |h %> <% join(', ', grep { $_ !~ /^(POST|FAX)$/ } @invoicing_list ) || $no %>
<% mt('Company') |h %> <% $cust_main->get("${pre}company") |h %>
<% mt('Address') |h %> <% $cust_main->get("${pre}address1") |h %>
<% $address2_label %> <% $cust_main->get("${pre}address2") |h %>
<% mt('City') |h %> <% $cust_main->get("${pre}city") |h %><% mt('County') |h %> <% $cust_main->get("${pre}county") |h %><% mt('State') |h %> <% state_label( $cust_main->get("${pre}state"), $cust_main->get("${pre}country") ) |h %> <% mt('Zip') |h %> <% $cust_main->get("${pre}zip") %>
<% mt('Country') |h %> <% code2country( $cust_main->get("${pre}country") ) %>
<% $phone_label{$phone} %> <& /elements/phonenumber.html, $cust_main->get($pre.$phone), 'callable'=>1, 'calling_list_exempt'=>$cust_main->calling_list_exempt, &>
<% mt('Fax') |h %> <% $cust_main->get("${pre}fax") || ' ' %>
<% $stateid_label %> <% $cust_main->masked('stateid') || ' ' %> <% $stateid_state_label %> <% $cust_main->stateid_state || ' ' %>
% if ( $which ne 'ship_' ) {
% } % } <%once> my %phone_label = ( 'daytime' => ( FS::Msgcat::_gettext('daytime') =~ /^(daytime)?$/ ? 'Day Phone' : FS::Msgcat::_gettext('daytime') ), 'night' => ( FS::Msgcat::_gettext('night') =~ /^(night)?$/ ? 'Night Phone' : FS::Msgcat::_gettext('night') ), 'mobile' => ( FS::Msgcat::_gettext('mobile') =~ /^(mobile)?$/ ? 'Mobile Phone' : FS::Msgcat::_gettext('Mobile') ), ); my $stateid_label = FS::Msgcat::_gettext('stateid') =~ /^(stateid)?$/ ? 'Driver’s License' : FS::Msgcat::_gettext('stateid'); my $stateid_state_label = FS::Msgcat::_gettext('stateid_state') =~ /^(stateid_state)?$/ ? 'Driver’s License State' : FS::Msgcat::_gettext('stateid_state'); <%init> my( $cust_main ) = @_; my $conf = new FS::Conf; my @invoicing_list = $cust_main->invoicing_list; my $no = emt('no');