X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fcontacts.html;h=12b9391a028f1a065df4c9adb10bbbab1ad2e6ed;hb=5214a5560240667a3a914c45df046b420926a5ec;hp=20770e45b8c694406719e12491802f2a37e30d34;hpb=f144c3a14169d99fd93f265da690d9ce38dbae68;p=freeside.git diff --git a/httemplate/view/cust_main/contacts.html b/httemplate/view/cust_main/contacts.html index 20770e45b..12b9391a0 100644 --- a/httemplate/view/cust_main/contacts.html +++ b/httemplate/view/cust_main/contacts.html @@ -1,91 +1,108 @@ % my %which = ( -% '' => 'Billing', -% 'ship_' => 'Service', +% '' => emt('Billing'), +% 'ship_' => emt('Service'), % ); % foreach my $which ( '', 'ship_' ) { % my $pre = $cust_main->get("${which}last") ? $which : ''; -<% $which{$which} %> address -<% ntable("#cccccc") %><% ntable("#cccccc",2) %> +<% $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') -% # && ( ( !$which && !$cust_main->has_ship_address ) -% # || ( $which && $cust_main->has_ship_address ) -% # ) -% && ! ( $which xor $cust_main->has_ship_address ) +% && ! ( $pre xor $cust_main->has_ship_address ) % ) -% ? 'Unit #' -% : ' '; +% ? 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') ) { @@ -94,20 +111,32 @@ % } -
Contact name<% mt('Contact name') |h %> - <% $cust_main->get("${pre}last"). ', '. $cust_main->get("${pre}first") %> + <% $cust_main->get("${pre}last"). ', '. $cust_main->get("${pre}first") |h %> SS#<% mt('SS#') |h %> <% $cust_main->masked('ss') || ' ' %>
<% mt('Email address(es)') |h %> + <% join(', ', grep { $_ !~ /^(POST|FAX)$/ } @invoicing_list ) || $no %> +
<% mt('Company') |h %><% $cust_main->get("${pre}company") |h %>
Company<% $cust_main->get("${pre}company") %>
Address<% $cust_main->get("${pre}address1") %><% mt('Address') |h %><% $cust_main->get("${pre}address1") |h %>
<% $address2_label %><% $cust_main->get("${pre}address2") %><% $cust_main->get("${pre}address2") |h %>
City<% $cust_main->get("${pre}city") %><% mt('City') |h %><% $cust_main->get("${pre}city") |h %>County<% $cust_main->get("${pre}county") %><% mt('County') |h %><% $cust_main->get("${pre}county") |h %>State<% state_label( $cust_main->get("${pre}state"), $cust_main->get("${pre}country") ) %>Zip<% mt('State') |h %><% state_label( $cust_main->get("${pre}state"), $cust_main->get("${pre}country") ) |h %><% mt('Zip') |h %> <% $cust_main->get("${pre}zip") %>
Country<% mt('Country') |h %> <% code2country( $cust_main->get("${pre}country") ) %>
<% $daytime_label %> - <% include('/elements/phonenumber.html', - $cust_main->get("${pre}daytime"), - 'callable'=>1 - ) - %> -
<% $night_label %> - <% include('/elements/phonenumber.html', - $cust_main->get("${pre}night"), - 'callable'=>1 - ) - %> -
Fax - <% $cust_main->get("${pre}fax") || ' ' %> -
<% $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->stateid_state || ' ' %>
+ + % if ( $which ne 'ship_' ) {
% } % } - <%once> -my $daytime_label = FS::Msgcat::_gettext('daytime') =~ /^(daytime)?$/ - ? 'Day Phone' - : FS::Msgcat::_gettext('daytime'); -my $night_label = FS::Msgcat::_gettext('night') =~ /^(night)?$/ - ? 'Night Phone' - : FS::Msgcat::_gettext('night'); +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'); @@ -120,6 +149,8 @@ my $stateid_state_label = FS::Msgcat::_gettext('stateid_state') =~ /^(stateid_st my( $cust_main ) = @_; my $conf = new FS::Conf; +my @invoicing_list = $cust_main->invoicing_list; +my $no = emt('no');