X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fcontacts.html;h=fe7cc5c0a29801681e759327a9adfdc8f004c1d0;hb=1ae273f69e5bf2b46c9c5fcd990ad923770ace56;hp=0b754d097070746d436c5217ee5dfb01f98d1e6b;hpb=2238711675eefa60cd2feb47c8d3e43d3e6f1860;p=freeside.git diff --git a/httemplate/view/cust_main/contacts.html b/httemplate/view/cust_main/contacts.html index 0b754d097..fe7cc5c0a 100644 --- a/httemplate/view/cust_main/contacts.html +++ b/httemplate/view/cust_main/contacts.html @@ -1,26 +1,39 @@ % my %which = ( -% '' => mt('Billing'), -% 'ship_' => mt('Service'), +% '' => emt('Billing'), +% 'ship_' => emt('Service'), % ); % foreach my $which ( '', 'ship_' ) { % my $pre = $cust_main->get("${which}last") ? $which : ''; -<% $which{$which} %> <% mt('address') |h %> -<% 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") ) { + + + + +% } + @@ -31,7 +44,7 @@ % ( $conf->exists('cust_main-require_address2') % && ! ( $pre xor $cust_main->has_ship_address ) % ) -% ? mt('Unit #') +% ? emt('Unit #') % : ' '; @@ -57,30 +70,39 @@ - - - - - - - - - - - - + +% 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') ) { @@ -89,20 +111,32 @@ % } -
<% mt('Contact name') |h %> <% $cust_main->get("${pre}last"). ', '. $cust_main->get("${pre}first") |h %> SS#<% $cust_main->masked('ss') || ' ' %><% mt('SS#') |h %><% $conf->exists('unmask_ss') ? $cust_main->ss : $cust_main->masked('ss') || ' ' %>
<% mt('Company') |h %><% $cust_main->get("${pre}company") |h %>
<% mt('Email address(es)') |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 %>
<% mt('Country') |h %> <% code2country( $cust_main->get("${pre}country") ) %>
<% $daytime_label %> - <& /elements/phonenumber.html, - $cust_main->get("${pre}daytime"), - 'callable'=>1 - &> -
<% $night_label %> - <& /elements/phonenumber.html, - $cust_main->get("${pre}night"), - 'callable'=>1 - &> -
<% mt('Fax') |h %> - <% $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_' ) {
% } % } -<& contacts_new.html, $cust_main &> <%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'); @@ -115,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');